Dynamoid icon indicating copy to clipboard operation
Dynamoid copied to clipboard

Added ability to use a custom field name for optimistic locking

Open sumocoder opened this issue 10 years ago • 2 comments

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

sumocoder avatar Feb 25 '15 08:02 sumocoder

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.

loganb avatar Mar 21 '15 17:03 loganb

Okay thanks! I'll make the change.

sumocoder avatar Mar 22 '15 20:03 sumocoder