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

JPQL extension: aggregates in ORDER BY

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: