Skip to content

Commit cebd48c

Browse files
committed
HHH-19336 - Proper implementation for JPA extended locking scope
HHH-19459 - LockScope, FollowOnLocking
1 parent addd093 commit cebd48c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hibernate-core/src/main/java/org/hibernate/sql/ast/spi/AbstractSqlAstTranslator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,10 @@ protected LockStrategy determineLockingStrategy(
17161716
return LockStrategy.FOLLOW_ON;
17171717
}
17181718

1719+
if ( !querySpec.isRoot() ) {
1720+
followOnStrategy = Locking.FollowOn.ALLOW;
1721+
}
1722+
17191723
LockStrategy strategy = LockStrategy.CLAUSE;
17201724

17211725
if ( !querySpec.getGroupByClauseExpressions().isEmpty() ) {

0 commit comments

Comments
 (0)