diff --git a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php index b4f9a8ad57e..fd7eafdc71b 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php @@ -51,6 +51,9 @@ class SQLAnywherePlatform extends AbstractPlatform public function appendLockHint($fromClause, $lockMode) { switch (true) { + case $lockMode === LockMode::NONE: + return $fromClause; + case $lockMode === LockMode::PESSIMISTIC_READ: return $fromClause . ' WITH (UPDLOCK)'; diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index 42ec3f16e25..693517609c4 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -1573,6 +1573,9 @@ public function getForeignKeyReferentialActionSQL($action) public function appendLockHint($fromClause, $lockMode) { switch (true) { + case $lockMode === LockMode::NONE: + return $fromClause; + case $lockMode === LockMode::PESSIMISTIC_READ: return $fromClause . ' WITH (HOLDLOCK, ROWLOCK)';