[ 
https://issues.apache.org/jira/browse/JDO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Bouschen resolved JDO-778.
----------------------------------
    Resolution: Fixed

Removed the two subquery methods taking a ListExpression and taking a 
MapExpression as argument. The remaining new subquery method is implemented by 
Datanucleus. The spec has been updated and there are test cases in the TCK.

> Adding overloaded methods to JDOQLTypedQuery to create a correlated subquery 
> -----------------------------------------------------------------------------
>
>                 Key: JDO-778
>                 URL: https://issues.apache.org/jira/browse/JDO-778
>             Project: JDO
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: JDO 3.1
>            Reporter: Michael Bouschen
>            Priority: Critical
>             Fix For: JDO 3.2
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> I propose to add the following overloaded subquery methods to support 
> correlated subqueries using a relationship field of the from clause of the 
> subquery, e.g.
> select firstname from org.apache.jdo.tck.pc.company.Employee 
>    where this.weeklyhours > 
>       (select AVG(e.weeklyhours) from this.department.employees e where 
> e.manager == this.manager)
> {{<{color:#20999d}E{color}> JDOQLTypedSubquery<{color:#20999d}E{color}> 
> subquery(CollectionExpression<Collection<{color:#20999d}E{color}>, 
> {color:#20999d}E{color}> candidateCollection, String candidateAlias);}}
>  {{<{color:#20999d}E{color}> JDOQLTypedSubquery<{color:#20999d}E{color}> 
> subquery(ListExpression<List<{color:#20999d}E{color}>, 
> {color:#20999d}E{color}> candidateList, String candidateAlias);}}
>  {{<{color:#20999d}K{color}, {color:#20999d}V{color}> 
> JDOQLTypedSubquery<Map.Entry<{color:#20999d}K{color}, 
> {color:#20999d}V{color}>> subquery(MapExpression<Map<{color:#20999d}K{color}, 
> {color:#20999d}V{color}>, {color:#20999d}K{color}, {color:#20999d}V{color}> 
> candidateMap, String candidateAlias);}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to