diff --git a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php index d6e6e2f59..a6bafea21 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/JoinClassPathExpression.php @@ -40,6 +40,6 @@ class JoinClassPathExpression extends Node public function dispatch($walker) { - return $sqlWalker->walkJoinPathExpression($this); + return $walker->walkJoinPathExpression($this); } } diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 26e31bdd7..fc3c313c6 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -1172,7 +1172,7 @@ class SqlWalker implements TreeWalker switch (true) { case ($expr instanceof AST\PathExpression): if ($expr->type !== AST\PathExpression::TYPE_STATE_FIELD) { - throw QueryException::invalidPathExpression($expr->type); + throw QueryException::invalidPathExpression($expr); } $fieldName = $expr->field; @@ -1213,7 +1213,6 @@ class SqlWalker implements TreeWalker case ($expr instanceof AST\SimpleArithmeticExpression): case ($expr instanceof AST\ArithmeticTerm): case ($expr instanceof AST\ArithmeticFactor): - case ($expr instanceof AST\ArithmeticPrimary): case ($expr instanceof AST\Literal): case ($expr instanceof AST\NullIfExpression): case ($expr instanceof AST\CoalesceExpression): @@ -1513,7 +1512,6 @@ class SqlWalker implements TreeWalker case ($expr instanceof AST\SimpleArithmeticExpression): case ($expr instanceof AST\ArithmeticTerm): case ($expr instanceof AST\ArithmeticFactor): - case ($expr instanceof AST\ArithmeticPrimary): case ($expr instanceof AST\Literal): case ($expr instanceof AST\NullIfExpression): case ($expr instanceof AST\CoalesceExpression):