Commit 431b63d6 authored by zYne's avatar zYne

fixes #356

parent 4fb80468
......@@ -699,7 +699,9 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
// parse the DQL parts
foreach ($this->_dqlParts as $queryPartName => $queryParts) {
$this->parts[$queryPartName] = array();
$this->removeQueryPart($queryPartName);
if (is_array($queryParts) && ! empty($queryParts)) {
foreach ($queryParts as $queryPart) {
......@@ -801,6 +803,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$q .= ( ! empty($this->parts['orderby']))? ' ORDER BY ' . implode(', ', $this->parts['orderby']) : '';
if ($modifyLimit) {
$q = $this->_conn->modifyLimitQuery($q, $this->parts['limit'], $this->parts['offset']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment