HHH-9635 - Fix SQLServer2005Dialect (and above) does not support read past locking

This commit is contained in:
Andrea Boriero 2016-02-05 15:01:06 +00:00
parent 4cb84a110c
commit b66eb91068
1 changed files with 4 additions and 3 deletions

View File

@ -76,11 +76,12 @@ public class SQLServer2005Dialect extends SQLServerDialect {
case UPGRADE: case UPGRADE:
case PESSIMISTIC_WRITE: case PESSIMISTIC_WRITE:
case WRITE: { case WRITE: {
return tableName + " with (updlock, rowlock" + noWaitStr + " )"; return tableName + " with (updlock, rowlock" + noWaitStr + ")";
} }
case PESSIMISTIC_READ: { case PESSIMISTIC_READ: {
return tableName + " with (holdlock, rowlock" + noWaitStr + " )"; return tableName + " with (holdlock, rowlock" + noWaitStr + ")";
} }case UPGRADE_SKIPLOCKED:
return tableName + " with (updlock, rowlock, readpast" + noWaitStr + ")";
default: { default: {
return tableName; return tableName;
} }