You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my_obj.metadata[:some][:path][:count] = 5
my_obj.save # this does not actually trigger an `UPDATE` request
my_obj.fubar = 'something else'
my_obj.save # this triggers an `UPDATE` request
On 3.8.0, calling .save triggers a PUT for both scenarios above.
On 3.8.0, if you change nested attributes like my_obj.metadata[:some][:path][:count] = 5, calling my_obj.changes afterwards returns an empty hash.
For context, I was operating on the same object but different columns, from 2 different threads, and realized one thread was overriding the other because .save calls PUT, so I was checking if I can get Dynamoid to call UPDATE to avoid this issue.
The text was updated successfully, but these errors were encountered:
Yeah, it's a known issue. Changes in a nested object (e.g. of a custom type, or serialized /map/array types) aren't detected and don't trigger persisting.
On 3.8.0, calling
.save
triggers aPUT
for both scenarios above.On 3.8.0, if you change nested attributes like
my_obj.metadata[:some][:path][:count] = 5
, callingmy_obj.changes
afterwards returns an empty hash.For context, I was operating on the same object but different columns, from 2 different threads, and realized one thread was overriding the other because
.save
callsPUT
, so I was checking if I can get Dynamoid to callUPDATE
to avoid this issue.The text was updated successfully, but these errors were encountered: