diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java index ca96d0d891..f3e9bd8ea9 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java @@ -515,6 +515,7 @@ public class StatefulPersistenceContext implements PersistenceContext { if ( holder != null ) { final Object entity = holder.entity; if ( holder.proxy != null ) { + holder.entity = null; entitiesByKey.put( key, holder ); } return entity;