Fix applying ON/WITH conditions to first join in Class Table Inheritance
This commit is contained in:
parent
606ae2e03d
commit
c6810861ca
@ -982,6 +982,11 @@ class SqlWalker implements TreeWalker
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: these should either be nested or all forced to be left joins (DDC-XXX)
|
||||||
|
if ($targetClass->isInheritanceTypeJoined()) {
|
||||||
|
$sql .= $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
|
||||||
|
}
|
||||||
|
|
||||||
// Handle WITH clause
|
// Handle WITH clause
|
||||||
if ($condExpr !== null) {
|
if ($condExpr !== null) {
|
||||||
// Phase 2 AST optimization: Skip processing of ConditionalExpression
|
// Phase 2 AST optimization: Skip processing of ConditionalExpression
|
||||||
@ -989,11 +994,6 @@ class SqlWalker implements TreeWalker
|
|||||||
$sql .= ' AND (' . $this->walkConditionalExpression($condExpr) . ')';
|
$sql .= ' AND (' . $this->walkConditionalExpression($condExpr) . ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: these should either be nested or all forced to be left joins (DDC-XXX)
|
|
||||||
if ($targetClass->isInheritanceTypeJoined()) {
|
|
||||||
$sql .= $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply the indexes
|
// Apply the indexes
|
||||||
if ($indexBy) {
|
if ($indexBy) {
|
||||||
// For Many-To-One or One-To-One associations this obviously makes no sense, but is ignored silently.
|
// For Many-To-One or One-To-One associations this obviously makes no sense, but is ignored silently.
|
||||||
|
Loading…
Reference in New Issue
Block a user