]
Gail Badner resolved HHH-1644.
------------------------------
Assignee: Gail Badner
Resolution: Duplicate
StatefulPersistenceContext.reassociateProxy: incorrect conditon is
always false
-------------------------------------------------------------------------------
Key: HHH-1644
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1644
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.1.3
Reporter: Michael Kopp
Assignee: Gail Badner
Priority: Minor
The following code is found in StatefulPersistenceContext. The session of the
LazyInitializer will always be different from the this pointer as the this pointer is a
different class!!
private void reassociateProxy(LazyInitializer li, HibernateProxy proxy) throws
HibernateException {
if ( li.getSession() != this ) {
EntityPersister persister = session.getFactory().getEntityPersister(
li.getEntityName() );
EntityKey key = new EntityKey( li.getIdentifier(), persister, session.getEntityMode()
);
if ( !proxiesByKey.containsKey(key) ) proxiesByKey.put(key, proxy); // any earlier
proxy takes precedence
proxy.getHibernateLazyInitializer().setSession(session);
}
}
I think it should be: li.getSession() != session
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: