Skip to content


DDC-2870: Doctrine error when using SUM( as `ìdentifier`: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got '=' #3627

doctrinebot opened this Issue · 0 comments

2 participants


Jira issue originally created by user c4d3r:

Doctrine error when using SUM( as ìdentifier: Expected Doctrine\ORM\Query\Lexer::TCLOSEPARENTHESIS, got '='

I am trying to execute a query in doctrine that contains something like this

SUM( = 1) as 1
for some reasons it always gives me the following error:

[Syntax Error] line 0, col 15: Error: Expected Doctrine\ORM\Query\Lexer::TCLOSEPARENTHESIS, got '='
This is the code i am using

$result = $em->getRepository('MyBundle:PlayerAction')
'SUM( as 1,
SUM( as 2,
SUM( as 3,
->innerJoin('pa.action', 'a')
->innerJoin('pa.player', 'p')
->where('pa.timestamp > ?1')
->setParameter(1, time() - $time)
->orderBy('p.playerName', 'ASC');

@beberlei beberlei was assigned by doctrinebot
@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.