From 69b1eb5c6490ecea4ea181cbd6a75ea1fb2771e1 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 11 Dec 2011 18:46:57 +0100 Subject: [PATCH] DDC-551 - Fix locking mess with filters --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 40ccf91d0..4cec1314d 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -1036,7 +1036,7 @@ class BasicEntityPersister } // Add filter SQL - if ('' !== $filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) { + if ($filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) { $this->_selectJoinSql .= ' AND ' . $filterSql; } } else { @@ -1284,10 +1284,10 @@ class BasicEntityPersister * * @return string */ - protected function getLockTablesSql($alias = null) + protected function getLockTablesSql() { return 'FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' - . (null !== $alias ? $alias : $this->_getSQLTableAlias($this->_class->name)); + . $this->_getSQLTableAlias($this->_class->name); } /** @@ -1541,10 +1541,10 @@ class BasicEntityPersister $alias = $this->_getSQLTableAlias($this->_class->name); $sql = 'SELECT 1 ' - . $this->getLockTablesSql($alias) + . $this->getLockTablesSql() . ' WHERE ' . $this->_getSelectConditionSQL($criteria); - if ('' !== $filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) { + if ($filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) { $sql .= ' AND ' . $filterSql; }