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 034afb96bf
commit 4fb11c9919
1 changed files with 4 additions and 3 deletions

View File

@ -76,11 +76,12 @@ public class SQLServer2005Dialect extends SQLServerDialect {
case UPGRADE:
case PESSIMISTIC_WRITE:
case WRITE: {
return tableName + " with (updlock, rowlock" + noWaitStr + " )";
return tableName + " with (updlock, rowlock" + noWaitStr + ")";
}
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: {
return tableName;
}