HHH-11161 - Prevent initialization of extra lazy collections

This commit is contained in:
barreiro 2017-01-29 00:34:46 +00:00 committed by Vlad Mihalcea
parent c70a28252b
commit f82c29ff42
1 changed files with 4 additions and 2 deletions

View File

@ -944,8 +944,10 @@ public abstract class AbstractEntityPersister
session.getPersistenceContext().addUninitializedCollection( persister, collection, key );
}
// Initialize it
session.initializeCollection( collection, false );
// HHH-11161 Initialize, if the collection is not extra lazy
if ( !persister.isExtraLazy() ) {
session.initializeCollection( collection, false );
}
interceptor.attributeInitialized( fieldName );
if ( collectionType.isArrayType() ) {