DDC-551 - Fix some ugly yoda conditions and a wrong nesting.
This commit is contained in:
parent
5e91f0c1ca
commit
f7175c229e
@ -903,7 +903,7 @@ class BasicEntityPersister
|
|||||||
|
|
||||||
$alias = $this->_getSQLTableAlias($this->_class->name);
|
$alias = $this->_getSQLTableAlias($this->_class->name);
|
||||||
|
|
||||||
if ('' !== $filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
|
if ($filterSql = $this->generateFilterConditionSQL($this->_class, $alias)) {
|
||||||
if ($conditionSql) {
|
if ($conditionSql) {
|
||||||
$conditionSql .= ' AND ';
|
$conditionSql .= ' AND ';
|
||||||
}
|
}
|
||||||
@ -1025,11 +1025,11 @@ class BasicEntityPersister
|
|||||||
$this->_selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($assoc['joinColumns']);
|
$this->_selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($assoc['joinColumns']);
|
||||||
$this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
|
$this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON ';
|
||||||
|
|
||||||
|
$tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias);
|
||||||
foreach ($assoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
|
foreach ($assoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) {
|
||||||
if ( ! $first) {
|
if ( ! $first) {
|
||||||
$this->_selectJoinSql .= ' AND ';
|
$this->_selectJoinSql .= ' AND ';
|
||||||
}
|
}
|
||||||
$tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias);
|
|
||||||
$this->_selectJoinSql .= $this->_getSQLTableAlias($assoc['sourceEntity']) . '.' . $sourceCol . ' = '
|
$this->_selectJoinSql .= $this->_getSQLTableAlias($assoc['sourceEntity']) . '.' . $sourceCol . ' = '
|
||||||
. $tableAlias . '.' . $targetCol;
|
. $tableAlias . '.' . $targetCol;
|
||||||
$first = false;
|
$first = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user