diff --git a/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/AbstractQueryConverter.php b/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/AbstractQueryConverter.php index 3e10e0daaf0..6d72563144c 100644 --- a/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/AbstractQueryConverter.php +++ b/src/Oro/Bundle/QueryDesignerBundle/QueryDesigner/AbstractQueryConverter.php @@ -1330,7 +1330,11 @@ protected function registerVirtualColumnQueryAliases($query, $mainEntityJoinId) } $joinType = $mapItem['type']; $join = $query['join'][$joinType][$mapItem['key']]; - $parentJoinId = $this->getParentJoinIdForVirtualColumnJoin($join['join'], $mainEntityJoinId); + $parentJoinId = $this->getParentJoinIdForVirtualColumnJoin( + $join['join'], + $mainEntityJoinId, + $joinMap + ); if (null !== $parentJoinId) { $alias = $join['alias']; $joinId = $this->buildJoinIdentifier($join, $parentJoinId, $joinType); @@ -1347,7 +1351,8 @@ protected function registerVirtualColumnQueryAliases($query, $mainEntityJoinId) $join = $query['join'][$joinType][$mapItem['key']]; $parentJoinId = $this->getParentJoinIdForVirtualColumnJoin( $join['join'], - $mainEntityJoinId + $mainEntityJoinId, + $joinMap ); if (null !== $parentJoinId) { $alias = $join['alias']; @@ -1402,10 +1407,11 @@ protected function findExistingTableAlias($virtualColumnJoinId, $virtualColumnJo /** * @param string $joinExpr * @param string $mainEntityJoinId + * @param array $joinMap * * @return string|null */ - protected function getParentJoinIdForVirtualColumnJoin($joinExpr, $mainEntityJoinId) + protected function getParentJoinIdForVirtualColumnJoin($joinExpr, $mainEntityJoinId, $joinMap) { $parts = explode('.', $joinExpr, 2);