HHH-16977 Fixed in NullPointerException in EntityEntryContext.downgradeLocks

This commit is contained in:
Laurent Klock 2023-07-24 11:26:36 +02:00 committed by Sanne Grinovero
parent c7bafd646a
commit bde1034aee
1 changed files with 4 additions and 1 deletions

View File

@ -402,7 +402,10 @@ public class EntityEntryContext {
}
private static void downgradeLockOnManagedEntity(final ManagedEntity node) {
node.$$_hibernate_getEntityEntry().setLockMode( LockMode.NONE );
final EntityEntry entityEntry = node.$$_hibernate_getEntityEntry();
if ( entityEntry != null ) {
entityEntry.setLockMode( LockMode.NONE );
}
}
/**