From 53055f1fb2f0d9f825876b73ffaf403ebc7ff8fe Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 1 Nov 2011 12:36:06 +0100 Subject: [PATCH] [DDC-551] Fixed a bug in the sql generation for filters --- lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 2 +- lib/Doctrine/ORM/Query/SqlWalker.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 737a7c1de..7b234ca58 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -1529,7 +1529,7 @@ class BasicEntityPersister $first = true; foreach($this->_em->getFilters()->getEnabledFilters() as $filter) { if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { - if ( ! $first) $sql .= ' AND '; else $first = false; + if ( ! $first) $filterSql .= ' AND '; else $first = false; $filterSql .= '(' . $filterExpr . ')'; } } diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 485708386..fa994da2c 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -358,7 +358,7 @@ class SqlWalker implements TreeWalker $first = true; foreach($this->_em->getFilters()->getEnabledFilters() as $filter) { if("" !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { - if ( ! $first) $sql .= ' AND '; else $first = false; + if ( ! $first) $filterSql .= ' AND '; else $first = false; $filterSql .= '(' . $filterExpr . ')'; } }