Skip to content


DDC-1077: Specifying a constant value in the SELECT clause causes parser error #1670

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user kmcbride:

User group post: []

Specifying a value in the select clause, such as the following, causes a parser error:

queryBuilder->select(' as name, \'foo\' as bar')->from->('Person p');

The equivalent SQL would be:

SELECT as name, 'foo' as bar FROM person;

And would result in something like the following:

name bar

steve foo
john foo
sally foo

The error output:

Doctrine\ORM\Query\QueryException : [Syntax Error] line 0, col 136: Error:

Expected IdentificationVariable | StateFieldPathExpression | AggregateExpression | "(" Subselect ")" | ScalarExpression, got 'foo'

Doctrine/ORM/Query/Parser.php(393): syntaxError()


Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.4 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.