[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5222?page=c...
]
Christian Bauer updated HHH-5222:
---------------------------------
Attachment: HHH-5222-test.txt
Attached a test for this issue.
EntityManager.lock(LockModeType.OPTIMISTIC) and LockModeType.OPTIMISTIC_FORCE_INCREMENT
are broken.
The org.hibernate.LockMode integer level (3 and 4) is too low for these types, you never
get an upgrade from READ (level 5).
Workaround: Query.setLockMode()
Bonus bug: The test should throw javax.persistence.OptimisticLockException and not
org.hibernate.OptimisticLockException
upgrade to OPTIMISTIC_FORCE_INCREMENT fails
-------------------------------------------
Key: HHH-5222
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5222
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.8, 4.0.0.CR6
Reporter: Scott Marlow
Assignee: Scott Marlow
Attachments: HHH-5222-test.txt
See hhh5032-2.patch attached to HHH-5032
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira