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

JPQL extension: scalar functions in SELECT

    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 does not allow scalar functions to be used in SELECT clauses. This can be useful in and of itself. Additionally, relational databases typically require that any functions used in a GROUP BY or ORDER BY clause are also used in the SELECT clause; paralleling this in JPQL seems to make sense.

      Example:

      select substring(o.stringField, 1, 1), count(o) from AllFieldTypes o
      group by substring(o.stringField, 1, 1)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: