This commit is contained in:
parent
2f66d604d6
commit
c8578d434a
@ -999,8 +999,12 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
|
|||||||
|
|
||||||
// apply inheritance to WHERE part
|
// apply inheritance to WHERE part
|
||||||
if ( ! empty($string)) {
|
if ( ! empty($string)) {
|
||||||
|
if (substr($string, 0, 1) === '(' && substr($string, -1) === ')') {
|
||||||
|
$this->parts['where'][] = $string;
|
||||||
|
} else {
|
||||||
$this->parts['where'][] = '(' . $string . ')';
|
$this->parts['where'][] = '(' . $string . ')';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$modifyLimit = true;
|
$modifyLimit = true;
|
||||||
@ -1424,6 +1428,8 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable
|
|||||||
|
|
||||||
$assocPath = $prevPath . '.' . $asf->getComponentName();
|
$assocPath = $prevPath . '.' . $asf->getComponentName();
|
||||||
|
|
||||||
|
$this->_aliasMap[$assocPath] = array('parent' => $prevPath, 'relation' => $relation, 'table' => $asf);
|
||||||
|
|
||||||
$assocAlias = $this->getTableAlias($assocPath, $asf->getTableName());
|
$assocAlias = $this->getTableAlias($assocPath, $asf->getTableName());
|
||||||
|
|
||||||
$queryPart = $join . $assocTableName . ' ' . $assocAlias;
|
$queryPart = $join . $assocTableName . ' ' . $assocAlias;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user