1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Added missing indexBy.

This commit is contained in:
Guilherme Blanco 2011-11-03 02:49:50 -02:00
parent 3c31d88810
commit 305da5b8ff

View File

@ -709,6 +709,14 @@ class SqlWalker implements TreeWalker
$sql = ($joinType == AST\Join::JOIN_TYPE_LEFT || $joinType == AST\Join::JOIN_TYPE_LEFTOUTER)
? ' LEFT JOIN '
: ' INNER JOIN ';
if ($joinVarDecl->indexBy) {
// For Many-To-One or One-To-One associations this obviously makes no sense, but is ignored silently.
$this->_rsm->addIndexBy(
$joinVarDecl->indexBy->simpleStateFieldPathExpression->identificationVariable,
$joinVarDecl->indexBy->simpleStateFieldPathExpression->field
);
}
$joinAssocPathExpr = $join->joinAssociationPathExpression;
$joinedDqlAlias = $join->aliasIdentificationVariable;