1
0
mirror of synced 2024-12-14 07:06:04 +03:00

fixed ticket #571

This commit is contained in:
phuson 2007-11-08 21:02:56 +00:00
parent ee9e79d09e
commit 175d3307c2

View File

@ -969,8 +969,12 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
$q .= $part;
continue;
}
// preserve LEFT JOINs only if needed
// preserve LEFT JOINs only if needed
// Check if it's JOIN, if not add a comma separator instead of space
if (!preg_match('/\bJOIN\b/i', $part) && !isset($this->_pendingJoinConditions[$k])) {
$q .= ', ' . $part;
} else {
if (substr($part, 0, 9) === 'LEFT JOIN') {
$e = explode(' ', $part);
@ -1000,6 +1004,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
}
$q .= ' ' . $part;
}
$this->parts['from'][$k] = $part;
}