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

Allow optimistic locking #297

Open
Mairu opened this issue May 2, 2019 · 1 comment
Open

Allow optimistic locking #297

Mairu opened this issue May 2, 2019 · 1 comment

Comments

@Mairu
Copy link

Mairu commented May 2, 2019

Sequelize with version: true option for models does internal optimistic locking. But if you want to provide your own version, to do "manual" optimistic locking from an api level you have to call instance.setDataValue('version', versionFromInput) before saving.

Would it be ok to add a optimisticLocking option to the service which does that?

I am willing to provide a pull request if it will be merged.

@daffl
Copy link
Member

daffl commented Jul 6, 2019

Sounds good to me as long as it can be turned off with a flag.

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

No branches or pull requests

2 participants