[ https://issues.apache.org/jira/browse/JDO-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808144#comment-16808144 ]
Michael Bouschen commented on JDO-778: -------------------------------------- Proposal: I create a branch in DataNucleus with a patch to JDOQLTypedQueryImpl.java with stub implementations of the new methods that throw UnsupportedOperationException. This will allow us to run the TCK but fail only on the correlated subquery test cases. Then, someone familiar with the DN implementation can fix the implementation. > 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: 10m > 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 (v7.6.3#76005)