]
Gail Badner updated HHH-1645:
-----------------------------
Affects Version/s: 4.0.0.CR1
I've verified this reproduces in 4.0.0.CR1.
refresh with LockMode on an unitialized proxy does not work
-----------------------------------------------------------
Key: HHH-1645
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1645
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.1.3, 4.0.0.CR1
Reporter: Michael Kopp
Attachments: ProxyTest.java
the DefaultRefreshEventListener.onRefresh method checks if the object in question is an
UninitializedProxy.
if ( source.getPersistenceContext().reassociateIfUninitializedProxy( event.getObject() )
) return;
If this is the case it will reassociate it and return.
The problem is it will lose the LockMode. If the refresh call was actually done with
LockMode.upgrade, the result should be a select for update, which does not happen in this
case.
This is especially anoying as it depends on the state of the proxy:
- unitialized --> no for update
- initialzed --> select for update
--
This message is automatically generated by JIRA.
For more information on JIRA, see: