It seems that doctrine do not understand constants in SELECT clause.
I try to execute such a query:
SELECT e.id, 'abc' as flag FROM SomeEntity
And I get this error:
[Semantical Error] line 0, col 40 near 'parent, p.weight,': Error: Invalid PathExpression. Must be a StateFieldPathExpression.
There was an issue like this a long time ago:
DDC-1077. It's written that it was Resolved, but it does not work.