Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to use a custom field name for optimistic locking #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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