HHH-16651 improve probability of getting cached loader
This commit is contained in:
parent
8bf5bb0d98
commit
f2017cd5a0
|
@ -309,7 +309,9 @@ public abstract class AbstractCollectionPersister
|
|||
|
||||
hasOrphanDelete = collectionBootDescriptor.hasOrphanDelete();
|
||||
|
||||
batchSize = collectionBootDescriptor.getBatchSize();
|
||||
batchSize = collectionBootDescriptor.getBatchSize() < 0
|
||||
? factory.getSessionFactoryOptions().getDefaultBatchFetchSize()
|
||||
: collectionBootDescriptor.getBatchSize();
|
||||
|
||||
isVersioned = collectionBootDescriptor.isOptimisticLocked();
|
||||
|
||||
|
|
|
@ -506,7 +506,9 @@ public abstract class AbstractEntityPersister
|
|||
|
||||
final Dialect dialect = creationContext.getDialect();
|
||||
|
||||
batchSize = persistentClass.getBatchSize();
|
||||
batchSize = persistentClass.getBatchSize() < 0
|
||||
? factory.getSessionFactoryOptions().getDefaultBatchFetchSize()
|
||||
: persistentClass.getBatchSize();
|
||||
hasSubselectLoadableCollections = persistentClass.hasSubselectLoadableCollections();
|
||||
hasPartitionedSelectionMapping = persistentClass.hasPartitionedSelectionMapping();
|
||||
hasCollectionNotReferencingPK = persistentClass.hasCollectionNotReferencingPK();
|
||||
|
|
Loading…
Reference in New Issue