diff --git a/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php b/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php index d01aafa81..5ac27be70 100644 --- a/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php +++ b/lib/Doctrine/ORM/Query/QueryExpressionVisitor.php @@ -127,12 +127,14 @@ class QueryExpressionVisitor extends ExpressionVisitor public function walkComparison(Comparison $comparison) { $parameterName = str_replace('.', '_', $comparison->getField()); + foreach($this->parameters as $parameter) { if($parameter->getName() === $parameterName) { $parameterName .= '_' . count($this->parameters); break; } } + $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); $placeholder = ':' . $parameterName;