Commit f58165cf authored by Steve Müller's avatar Steve Müller

fix table hints again

parent f0ed949c
......@@ -848,15 +848,15 @@ class SQLServerPlatform extends AbstractPlatform
public function appendLockHint($fromClause, $lockMode)
{
if ($lockMode == LockMode::NONE) {
return $fromClause . ' WITH (READUNCOMMITTED)'; // equivalent to NOLOCK
return $fromClause . ' WITH (NOLOCK)';
}
if ($lockMode == LockMode::PESSIMISTIC_READ) {
return $fromClause . ' WITH (READCOMMITTED)';
return $fromClause . ' WITH (HOLDLOCK, ROWLOCK)';
}
if ($lockMode == LockMode::PESSIMISTIC_WRITE) {
return $fromClause . ' WITH (SERIALIZABLE)'; // equivalent to HOLDLOCK
return $fromClause . ' WITH (UPDLOCK, ROWLOCK)';
}
return $fromClause;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment