HHH-12572 - Exclude LockMode.WRITE from loader creation loop

This commit is contained in:
Steve Ebersole 2018-05-14 17:45:35 -05:00
parent 24cfffeec4
commit 4bae1ca810
1 changed files with 1 additions and 1 deletions

View File

@ -4136,7 +4136,7 @@ public abstract class AbstractEntityPersister
// The loaders for the other lock modes are lazily loaded and will later be stored in this map,
// unless this setting is disabled
if ( ! factory.getSessionFactoryOptions().isDelayBatchFetchLoaderCreationsEnabled() ) {
for ( LockMode lockMode : EnumSet.complementOf( EnumSet.of( LockMode.NONE, LockMode.READ ) ) ) {
for ( LockMode lockMode : EnumSet.complementOf( EnumSet.of( LockMode.NONE, LockMode.READ, LockMode.WRITE ) ) ) {
loaders.put( lockMode, createEntityLoader( lockMode ) );
}
}