This query will crash Doctrine 2:
Here is the hard error I get:
Catchable fatal error: Argument 1 passed to Doctrine\ORM\Query\SqlWalker::walkGroupByItem() must be an instance of Doctrine\ORM\Query\AST\PathExpression, string given in /var/www/invoiceCreator/src/thirdPartyComponents/doctrine/Doctrine/ORM/Query/SqlWalker.php on line 1203
Of course, the query shown is pointless. I reduced it from a more complex statement to illustrate that it is actually the GROUP BY that breaks Doctrine. Even in a meaningful scenario with aggregates, it would not work.