[DDC-551] Add filters to eagerly joined entities in the persisters
This commit is contained in:
parent
07ce4092cd
commit
9ccce8ed74
@ -1020,10 +1020,17 @@ class BasicEntityPersister
|
||||
$this->_selectJoinSql .= ' AND ';
|
||||
}
|
||||
|
||||
$tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias);
|
||||
$this->_selectJoinSql .= $this->_getSQLTableAlias($assoc['sourceEntity']) . '.' . $sourceCol . ' = '
|
||||
. $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias) . '.' . $targetCol . ' ';
|
||||
. $tableAlias . '.' . $targetCol . ' ';
|
||||
|
||||
$first = false;
|
||||
}
|
||||
|
||||
// Add filter SQL
|
||||
if('' !== $filterSql = $this->generateFilterConditionSQL($eagerEntity, $tableAlias)) {
|
||||
$this->_selectJoinSql .= ' AND ' . $filterSql;
|
||||
}
|
||||
} else {
|
||||
$eagerEntity = $this->_em->getClassMetadata($assoc['targetEntity']);
|
||||
$owningAssoc = $eagerEntity->getAssociationMapping($assoc['mappedBy']);
|
||||
|
Loading…
Reference in New Issue
Block a user