1
0
mirror of synced 2025-03-22 07:53:49 +03:00

DDC-551 - Fix locking mess with filters

This commit is contained in:
Benjamin Eberlei 2011-12-11 18:46:57 +01:00
parent 0f501114eb
commit 69b1eb5c64

View File

@ -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;
}