Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1036

the Aggregate Expressions "AVG" | "MAX" | "MIN" | "SUM", should be followed by SimpleArithmeticExpression

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.2, 2.1
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

      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

        Activity

        Hide
        Guilherme Blanco added a comment -

        You are totally right.

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

        Show
        Guilherme Blanco added a comment - You are totally right. I fixed on trunk repository. Thanks a lot for pointing out this issue. =)
        Hide
        Benjamin Eberlei added a comment -

        Merged into 2.0.x also

        Show
        Benjamin Eberlei added a comment - Merged into 2.0.x also

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Jison Xiao
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: