Dynamoid
Dynamoid copied to clipboard
Added ability to use a custom field name for optimistic locking
I added the option to define a custom field name for optimistic locking.
optimistic_lock_field :some_custom_field
You can still use the old way
field lock_version
If both lock_version and a custom lock field is set, It will make use of the custom lock field
Hello,
Thank you for this improvement! Would you mind making the interface conform to ActiveRecord's API (http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html)? I'd like Dynamoid to conform to ActiveRecord as much as reasonably possible.
Okay thanks! I'll make the change.