Skip to content

Conversation

@sumocoder
Copy link

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

@loganb
Copy link
Collaborator

loganb commented Mar 21, 2015

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.

@sumocoder
Copy link
Author

Okay thanks! I'll make the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants