fixed ticket #571
This commit is contained in:
parent
ee9e79d09e
commit
175d3307c2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user