diff --git a/src/Bundle/Doctrine/ORM/ExpressionBuilder.php b/src/Bundle/Doctrine/ORM/ExpressionBuilder.php index e568f83c..29a89667 100644 --- a/src/Bundle/Doctrine/ORM/ExpressionBuilder.php +++ b/src/Bundle/Doctrine/ORM/ExpressionBuilder.php @@ -40,7 +40,10 @@ public function orX(...$expressions) public function comparison(string $field, string $operator, $value) { - return new Comparison($field, $operator, $value); + $fieldWithJoin = $this->resolveFieldByAddingJoins($field); + $valueWithJoin = $this->resolveFieldByAddingJoins($value); + + return new Comparison($fieldWithJoin, $operator, $valueWithJoin); } public function equals(string $field, $value)