From 169efbe8c6cddcc7e20d27325f8196f6a32dac88 Mon Sep 17 00:00:00 2001 From: Steve Mareigner Date: Thu, 31 Jan 2019 09:57:44 +0100 Subject: [PATCH] fix(core): CROSS JOIN when nested relations due to duplicate alias --- src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php b/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php index 7c53a0d..31daa90 100644 --- a/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php +++ b/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php @@ -131,7 +131,7 @@ public function useQuery($alias = null): ModelCriteria $path = implode(self::RELATION_SEP, $this->map); throw new RelationNotFoundException("Relation \"$relation\" Not Found in \"$path\""); } - $this->query = call_user_func([$this->query, $method], $alias); + $this->query = call_user_func([$this->query, $method], $alias . "_" . $relation); } } $this->inUse = true;