Details
Description
User group post: http://groups.google.com/group/doctrine-user/browse_thread/thread/7f49cf9ff36d0750
Specifying a value in the select clause, such as the following, causes a parser error:
queryBuilder->select('p.name as name, \'foo\' as bar')>from>('Person p');
The equivalent SQL would be:
SELECT p.name 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()
Issue Links
- is referenced by
-
DDC-1095
Selecting Literals will not work, crashing bug
-
Fixed