1
0
mirror of synced 2024-12-05 03:06:05 +03:00

Fix LimitSubqueryOutputWalker when used on tables with joined table inheritance

This commit is contained in:
Bill Schaller 2015-03-25 21:24:28 -04:00 committed by Marco Pivetta
parent b923c937e2
commit 54d7efd92c

View File

@ -344,6 +344,14 @@ class LimitSubqueryOutputWalker extends SqlWalker
// Generate search patterns for each field's path expression in the order by clause
foreach($this->rsm->fieldMappings as $fieldAlias => $columnName) {
$dqlAliasForFieldAlias = $this->rsm->columnOwnerMap[$fieldAlias];
$class = $dqlAliasToClassMap[$dqlAliasForFieldAlias];
// If the field is from a joined child table, we won't be ordering
// on it.
if (!isset($class->fieldMappings[$columnName])) {
continue;
}
$columnName = $this->quoteStrategy->getColumnName(
$columnName,
$dqlAliasToClassMap[$dqlAliasForFieldAlias],