[DDC-551] Fixed a bug in the sql generation for filters
This commit is contained in:
parent
9ccce8ed74
commit
53055f1fb2
@ -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 . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user