From 9ed0e6e8868f79680ec3af4cd4a49919de1e1143 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 17 Jun 2007 17:01:35 +0000 Subject: [PATCH] --- lib/Doctrine/Query.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index ab3f7ebec..0e21fbb3d 100644 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -677,8 +677,10 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable $q .= ' SET ' . implode(', ', $this->parts['set']); } - $string = $this->applyInheritance(); + $string = $this->applyInheritance(); + + // apply inheritance to WHERE part if ( ! empty($string)) { $this->parts['where'][] = '(' . $string . ')'; } @@ -694,7 +696,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable switch (strtolower($this->_conn->getName())) { case 'mysql': // mysql doesn't support LIMIT in subqueries - $list = $this->_conn->execute($subquery, $params)->fetchAll(PDO::FETCH_COLUMN); + $list = $this->_conn->execute($subquery, $params)->fetchAll(Doctrine::FETCH_COLUMN); $subquery = implode(', ', $list); break; case 'pgsql':