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 2b83fb8a7f..ed0a5dc862 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 @@ -846,7 +846,7 @@ public class StatefulPersistenceContext implements PersistenceContext { @Override public Object getLoadedCollectionOwnerOrNull(PersistentCollection collection) { final CollectionEntry ce = getCollectionEntry( collection ); - if ( ce.getLoadedPersister() == null ) { + if ( ce == null || ce.getLoadedPersister() == null ) { return null; }