OpenJPA
  1. OpenJPA
  2. OPENJPA-490

JPQL extension: aggregates in ORDER BY

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0, 0.9.6, 0.9.7, 1.0.0, 1.0.1
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None

      Description

      JPQL only allows state fields in ORDER BY clauses. It is useful to order by aggregates when doing a GROUP BY as well. Example:

      select sum(o.shortField) from AllFieldTypes o
      group by o.intField
      order by sum(o.shortField) asc

        Activity

        Patrick Linskey created issue -
        Patrick Linskey made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Patrick Linskey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development