[hibernate-commits] Hibernate SVN: r10696 - trunk/Hibernate3/src/org/hibernate/engine
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Thu Nov 2 14:28:16 EST 2006
Author: steve.ebersole at jboss.com
Date: 2006-11-02 14:28:15 -0500 (Thu, 02 Nov 2006)
New Revision: 10696
Modified:
trunk/Hibernate3/src/org/hibernate/engine/StatefulPersistenceContext.java
Log:
HHH-1756 : BatchFetchQueue and evicted proxies
Modified: trunk/Hibernate3/src/org/hibernate/engine/StatefulPersistenceContext.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/engine/StatefulPersistenceContext.java 2006-11-02 19:18:52 UTC (rev 10695)
+++ trunk/Hibernate3/src/org/hibernate/engine/StatefulPersistenceContext.java 2006-11-02 19:28:15 UTC (rev 10696)
@@ -836,10 +836,20 @@
}
/**
- * Remove a proxy from the session cache
+ * Remove a proxy from the session cache.
+ * <p/>
+ * Additionally, ensure that any load optimization references
+ * such as batch or subselect loading get cleaned up as well.
+ *
+ * @param key The key of the entity proxy to be removed
+ * @return The proxy reference.
*/
public Object removeProxy(EntityKey key) {
- return proxiesByKey.remove(key);
+ if ( batchFetchQueue != null ) {
+ batchFetchQueue.removeBatchLoadableEntityKey( key );
+ batchFetchQueue.removeSubselect( key );
+ }
+ return proxiesByKey.remove( key );
}
/**
More information about the hibernate-commits
mailing list