DDC-551 - Fix locking mess with filters
This commit is contained in:
parent
0f501114eb
commit
69b1eb5c64
@ -1036,7 +1036,7 @@ class BasicEntityPersister
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add filter SQL
|
// Add filter SQL
|
||||||
if ('' !== $filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) {
|
if ($filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) {
|
||||||
$this->_selectJoinSql .= ' AND ' . $filterSql;
|
$this->_selectJoinSql .= ' AND ' . $filterSql;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1284,10 +1284,10 @@ class BasicEntityPersister
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getLockTablesSql($alias = null)
|
protected function getLockTablesSql()
|
||||||
{
|
{
|
||||||
return 'FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' '
|
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);
|
$alias = $this->_getSQLTableAlias($this->_class->name);
|
||||||
|
|
||||||
$sql = 'SELECT 1 '
|
$sql = 'SELECT 1 '
|
||||||
. $this->getLockTablesSql($alias)
|
. $this->getLockTablesSql()
|
||||||
. ' WHERE ' . $this->_getSelectConditionSQL($criteria);
|
. ' WHERE ' . $this->_getSelectConditionSQL($criteria);
|
||||||
|
|
||||||
if ('' !== $filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
|
if ($filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
|
||||||
$sql .= ' AND ' . $filterSql;
|
$sql .= ' AND ' . $filterSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user