openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Wei (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-967) JPA2 Query support for selction of KEY, VALUE, ENTRY of a Map value
Date Thu, 12 Mar 2009 18:18:50 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681426#action_12681426
] 

Catalina Wei commented on OPENJPA-967:
--------------------------------------

In evaluating support for KEY(e),
the following JPQL queries should be considiered not valid:

    1. select e from Dept d join d.emps e where KEY(e) IS NULL

        IS NULL predicate is for evaluating association fields.
        KEY(e) can be a basic type, an embeddable class, or an entity class; KEY(e) is not
an association field.

    2. select KEY(e) from Dept d join d.emps e ORDER BY KEY(e)
        
        The JPA2 Spec says, order item should be a state_field_path_expression; KEY(e) is
not a state_field_path_expression.
       
        The following query is valid ; KEY(e).address.city is a state_field_path_expression:
       
        select KEY(e) from Dept d join d.emps ORDER BY KEY(e).address.city

  3. select COUNT(KEY(e)) from Dept d join d.emps e GROUP BY KEY(e)

     a GROUP BY item requires an aggregate function in the selection list, but
          the KEY(e) is not allowed as an argument of COUNT function.
     
       The following query should be valid since KEY(e).address.city is a state_field_path_expression;
a valid argument to COUNT and a valid group by item:
        
       select COUNT(KEY(e).address.city) from Dept d join d.emps e GROUP BY KEY(e).address.city


> JPA2 Query support for selction of KEY, VALUE, ENTRY of a Map value
> -------------------------------------------------------------------
>
>                 Key: OPENJPA-967
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-967
>             Project: OpenJPA
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>         Environment: This sub-task is to finishing up the selection of ENTRY, VALUE,
ENTRY work started in OPENJPA-879 (iteration 4 sub-task).
> This sub-task is to add additional support for map value with @MapKeyClass and/or @MapJoinColumn(s)
annotations.
>            Reporter: Catalina Wei
>            Assignee: Catalina Wei
>


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


Mime
View raw message