1
0
mirror of synced 2025-01-18 22:41:43 +03:00

DQL limit-subquery-algorithm ORDER BY handling fixed

This commit is contained in:
zYne 2007-05-31 18:30:47 +00:00
parent cfa0351d2b
commit e7732ee975

View File

@ -751,14 +751,14 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$subquery .= ' FROM';
foreach ($this->parts['from'] as $part) {
// preserve LEFT JOINs only if needed
if (substr($part, 0, 9) === 'LEFT JOIN') {
$e = explode(' ', $part);
if ( ! in_array($e[3], $this->subqueryAliases) &&
! in_array($e[2], $this->subqueryAliases)) {
continue;
if (empty($this->parts['orderby']) && empty($this->parts['where'])) {
continue;
}
}