JPQL extension: scalar functions in SELECT
------------------------------------------

                 Key: OPENJPA-492
                 URL: https://issues.apache.org/jira/browse/OPENJPA-492
             Project: OpenJPA
          Issue Type: New Feature
    Affects Versions: 1.0.1, 1.0.0, 0.9.7, 0.9.6, 0.9.0
            Reporter: Patrick Linskey
             Fix For: 1.1.0


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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to