diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 16d9e1081..486d4af62 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -1353,8 +1353,7 @@ class SqlWalker implements TreeWalker break; case ($expr instanceof AST\NewObjectExpression): - $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; - $sql .= $this->walkNewObject($expr,$resultAlias); + $sql .= $this->walkNewObject($expr,$selectExpression->fieldIdentificationVariable); break; default: