Refreshing an entity clears the lock mode returned from EntityManager.getLockMode
Description
Attachments
1
Activity
Show:

Christian Beikov January 25, 2023 at 4:27 PM
If this bug is still an issue for you, please create a new Jira issue with a test case that reproduces the problem and a reference to this issue.

Rustam Anvarov January 17, 2023 at 5:48 PM
Hey guys, this error persists in 5.3.0 - 5.6.0, please re-open this case

Former user April 26, 2018 at 7:56 PM
Fixed in master and 5.2 branches.
Steve Ebersole April 25, 2018 at 1:21 PM
Going to unschedule this soon...
Steve Ebersole April 18, 2018 at 3:43 PM
Waiting on feedback from wrt PR
When an entity has been locked within a transaction and later a refresh is invoked upon it this causes EntityManager.getLockMode to return the standard OPTIMISTIC lock mode type (indicating not locked).
e.g.
A simple project has been included which illustrates this.