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

Add optimistic locking to hibernate entities #325

Open
mpostelnicu opened this issue Oct 19, 2020 · 0 comments
Open

Add optimistic locking to hibernate entities #325

mpostelnicu opened this issue Oct 19, 2020 · 0 comments
Assignees

Comments

@mpostelnicu
Copy link
Contributor

mpostelnicu commented Oct 19, 2020

Hibernate/JPA has built-in support for optimistic (and pessimistic) locking.
Optimistic locking is easy to enable and can improve data quality by informing the user a version of the edited data has been changed. Even though in this case the other user will lose all data that she is trying to save, having this check in addition to autosave is not going to lead to major data loss and will provide critical info for user about content being edited by someone else before her save.
https://www.baeldung.com/jpa-optimistic-locking

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

No branches or pull requests

2 participants