DDC-1036: the Aggregate Expressions "AVG" | "MAX" | "MIN" | "SUM", should be followed by SimpleArithmeticExpression #1292

Closed
opened 2026-01-22 13:08:37 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 16, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user jison:

the Aggregate Expressions "AVG" | "MAX" | "MIN" | "SUM", should be not only followed by StateFieldPathExpression , but also SimpleArithmeticExpression,
see http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#aggregate-expressions

i found it can not execute dql like
select sum(c.quantity * c.price) total_price from cart c

i think, this should be a bug

Originally created by @doctrinebot on GitHub (Feb 16, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user jison: the Aggregate Expressions "AVG" | "MAX" | "MIN" | "SUM", should be not only followed by StateFieldPathExpression , but also SimpleArithmeticExpression, see http://www.doctrine-project.org/docs/orm/2.0/en/reference/dql-doctrine-query-language.html#aggregate-expressions i found it can not execute dql like select sum(c.quantity \* c.price) total_price from cart c i think, this should be a bug
admin added the Bug label 2026-01-22 13:08:37 +01:00
admin closed this issue 2026-01-22 13:08:38 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 19, 2011):

Comment created by @guilhermeblanco:

You are totally right.

I fixed on trunk repository. Thanks a lot for pointing out this issue. =)

@doctrinebot commented on GitHub (Feb 19, 2011): Comment created by @guilhermeblanco: You are totally right. I fixed on trunk repository. Thanks a lot for pointing out this issue. =)
Author
Owner

@doctrinebot commented on GitHub (Feb 20, 2011):

Comment created by @beberlei:

Merged into 2.0.x also

@doctrinebot commented on GitHub (Feb 20, 2011): Comment created by @beberlei: Merged into 2.0.x also
Author
Owner

@doctrinebot commented on GitHub (Feb 20, 2011):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Feb 20, 2011): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1292