diff --git a/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php b/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php index 72efd9e..3e62348 100644 --- a/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php +++ b/src/Service/QueryModifier/UseQuery/UseQueryFromDotNotation.php @@ -132,7 +132,7 @@ public function useQuery($alias = null, $joinType = 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 . "_" . $relation, $joinType); + $this->query = call_user_func([$this->query, $method], "`" . $alias . "_" . $relation . "`", $joinType); } } $this->inUse = true;