-
Notifications
You must be signed in to change notification settings - Fork 59
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
Improve Javadoc about OptimisticLockException #601
base: master
Are you sure you want to change the base?
Conversation
* cascades. | ||
* cascades. It will cause later {@link #flush()} throws | ||
* {@link OptimisticLockException} if entity is updated or deleted by | ||
* another transaction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note sure what this is trying to say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to
* <p>Note that {@link OptimisticLockException} may not be thrown by this
* method but defer to database synchronization operation.
So I believe—but I'm not sure, without digging more deeply—that we actually permit the provider to throw |
Unlike stateless entity manager, for stateful entity manager, there is no database interaction until flush, |
That is one possible implementation, sure. But what the spec actually says is stuff like:
And of course, it's definitely the case that synchronization can happen when So optimistic lock failures can in principle happen at lots of other moments, not only in the ones you've listed here. |
Signed-off-by: Yanming Zhou <[email protected]>
No description provided.