1
0
mirror of synced 2025-01-19 06:51:40 +03:00

[DDC-551] Fixed a bug in the sql generation for filters

This commit is contained in:
Alexander 2011-11-01 12:36:06 +01:00
parent 9ccce8ed74
commit 53055f1fb2
2 changed files with 2 additions and 2 deletions

View File

@ -1529,7 +1529,7 @@ class BasicEntityPersister
$first = true; $first = true;
foreach($this->_em->getFilters()->getEnabledFilters() as $filter) { foreach($this->_em->getFilters()->getEnabledFilters() as $filter) {
if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
if ( ! $first) $sql .= ' AND '; else $first = false; if ( ! $first) $filterSql .= ' AND '; else $first = false;
$filterSql .= '(' . $filterExpr . ')'; $filterSql .= '(' . $filterExpr . ')';
} }
} }

View File

@ -358,7 +358,7 @@ class SqlWalker implements TreeWalker
$first = true; $first = true;
foreach($this->_em->getFilters()->getEnabledFilters() as $filter) { foreach($this->_em->getFilters()->getEnabledFilters() as $filter) {
if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
if ( ! $first) $sql .= ' AND '; else $first = false; if ( ! $first) $filterSql .= ' AND '; else $first = false;
$filterSql .= '(' . $filterExpr . ')'; $filterSql .= '(' . $filterExpr . ')';
} }
} }