From b6da2e0e425c4481aac3bc332a0e0eced1d2bacf Mon Sep 17 00:00:00 2001 From: Juozas Kaziukenas Date: Tue, 16 Nov 2010 16:12:08 -0800 Subject: [PATCH] Proper FORM clause generation to support locking --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index f249ac29a..2903ac96f 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -844,8 +844,8 @@ class BasicEntityPersister } return 'SELECT ' . $this->_getSelectColumnListSQL() - . ' FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' - . $this->_getSQLTableAlias($this->_class->name) + . $this->_platform->appendLockHint(' FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' + . $this->_getSQLTableAlias($this->_class->name), $lockMode) . $joinSql . ($conditionSql ? ' WHERE ' . $conditionSql : '') . $orderBySql @@ -1082,7 +1082,7 @@ class BasicEntityPersister } $sql = 'SELECT 1 ' - . $this->getLockTablesSql() + . $this->_platform->appendLockHint($this->getLockTablesSql(), $lockMode) . ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ' . $lockSql; $params = array_values($criteria); $this->_conn->executeQuery($sql, $params);