Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-490

JPQL extension: aggregates in ORDER BY

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.6, 0.9.7, 1.0.0, 1.0.1
    • 1.1.0
    • None
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            pcl Patrick Linskey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: