HHH-10890 - PostgreSQL does not consider alias-specific LockMode

This commit is contained in:
Vlad Mihalcea 2016-06-28 17:38:11 +03:00
parent 5cb5b68f9c
commit 0b34910b22
1 changed files with 4 additions and 1 deletions

View File

@ -287,7 +287,10 @@ public class PostgreSQL81Dialect extends Dialect {
} }
} }
} }
LockMode lockMode = lockOptions.getLockMode(); LockMode lockMode = lockOptions.getAliasSpecificLockMode( aliases );
if (lockMode == null ) {
lockMode = lockOptions.getLockMode();
}
switch ( lockMode ) { switch ( lockMode ) {
case UPGRADE: case UPGRADE:
return getForUpdateString(aliases); return getForUpdateString(aliases);