| Hi, I have found one issue related with ScrollableResults and fetching child collection for version 4.3.10. I’m getting NPE from StatefulPersistenceContex line 756 because ce is null: public Object getLoadedCollectionOwnerOrNull(PersistentCollection collection) { final CollectionEntry ce = getCollectionEntry( collection ); if ( ce.getLoadedPersister() == null ) { return null; } ... I have child collection PairingComplement –s. Single PairingComplement is using in method hashCode other collection Positions related with PairingComplement and fetched after PairingComplement –s ( example hql: Select p from Pairing p left outer join fetch p.complements c left outer join fetch c.positions ) Seems that order is the reason why StatefulPersistenceContext collectionEntries does not contains Positions collection. java.lang.NullPointerException at org.hibernate.engine.internal.StatefulPersistenceContext.getLoadedCollectionOwnerOrNull(StatefulPersistenceContext.java:756) at org.hibernate.event.spi.AbstractCollectionEvent.getLoadedOwnerOrNull(AbstractCollectionEvent.java:75) at org.hibernate.event.spi.InitializeCollectionEvent.<init>(InitializeCollectionEvent.java:36) at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1931) at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:558) at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:260) at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554) at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142) at org.hibernate.collection.internal.PersistentSet.hashCode(PersistentSet.java:447) at java.util.Collections$UnmodifiableSet.hashCode(Collections.java:1130) at com...domain.complement.PairingComplement.hashCode(PairingComplement.java:175) at java.util.HashMap.hash(HashMap.java:338) at java.util.HashMap.put(HashMap.java:611) at java.util.HashSet.add(HashSet.java:219) at java.util.AbstractCollection.addAll(AbstractCollection.java:344) at org.hibernate.collection.internal.PersistentSet.endRead(PersistentSet.java:344) at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:251) at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:238) at org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:211) at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:1157) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1126) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1069) at org.hibernate.loader.Loader.sequentialLoad(Loader.java:470) at org.hibernate.loader.Loader.loadSequentialRowsForward(Loader.java:537) at org.hibernate.internal.FetchingScrollableResultsImpl.next(FetchingScrollableResultsImpl.java:88) |