// in a temp collection. the temp collection is then used to "drive"
// the #endRead processing.
List<LoadingCollectionEntry> matches = null;
Iterator<CollectionKey> iter = localLoadingCollectionKeys.iterator();
while ( iter.hasNext() ) {
final CollectionKey collectionKey = iter.next();
final LoadingCollectionEntry lce = loadContexts.locateLoadingCollectionEntry( collectionKey );
if ( lce == null) {
log.warn( "In CollectionLoadContext#endLoadingCollections, localLoadingCollectionKeys contained [" + collectionKey + "], but no LoadingCollectionEntry was found in loadContexts" );
}
else if ( lce.getResultSet() == resultSet && lce.getPersister() == persister ) {
if ( lce.getCollection().getOwner() == null ) {
session.getPersistenceContext().addUnownedCollection(
new CollectionKey( persister, lce.getKey(), session.getEntityMode() ),
lce.getCollection()
);
}
else if ( loadedEntity != null && lce.getCollection().getOwner() != loadedEntity ) {
continue;