[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5275?page=c...
]
Björn Moritz commented on HHH-5275:
-----------------------------------
In the Query API there are two methods: setLockOptions and setLockMode. setLockOptions
seems to work (as far as I can see from the org.hibernate.impl.QueryImpl class), but I did
not test it. setLockOptions does not exist in Criteria API.
Criteria.setLockMode does not work correctly
--------------------------------------------
Key: HHH-5275
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5275
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.2
Environment: Hibernate 3.5.2, Oracle 10 (using
org.hibernate.dialect.Oracle10gDialect
Reporter: Björn Moritz
Priority: Minor
Attachments: TestCase.zip
The LockMode set via Criteria.setLockMode does not generate a ' for update' SQL
statement. In the org.hibernate.dialect.Dialect class only the LockOptions are used for
determining a possible addition to the SQL statement if using pessimistic locking. This
behaviour is different from Hibernate 3.1.3.
In the supplied TestCase two threads are reading the same database record; one of those
threads should use pessimistic locking thereby blocking the other thread. But both threads
can read the database record causing the test to fail.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira