[
https://issues.apache.org/jira/browse/JDO-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561793#action_12561793
]
Craig Russell commented on JDO-568:
-----------------------------------
Hi Andy,
> The subquery seems to have an "alias" specified for the candidate ("e"). I
> don't see this in the spec for single-string queries (14.6.13), so maybe its
> a JPQLism that should be omitted ?
For a subquery, an alias is needed to disambiguate a field reference in the
subquery from the outer query, since for the api version any references to the
outer query need to be passed as parameters.
> Query q = pm.newQuery("SELECT AVG(e.weeklyhours) FROM
> this.department.employees e");
> q.execute();
> I'd expect JDOUserException...
I agree that the subquery cannot be executed directly as a top level query.
This means that the FROM clause for subqueries is different from outer queries.
Once we agree on these two items, I'll update the specification.
> Add subquery support to JPOX
> ----------------------------
>
> Key: JDO-568
> URL: https://issues.apache.org/jira/browse/JDO-568
> Project: JDO
> Issue Type: Task
> Components: tck2, tck2-legacy
> Affects Versions: JDO 2 maintenance release 1
> Reporter: Michael Bouschen
> Assignee: Andy Jefferson
> Fix For: JDO 2 maintenance release 1
>
> Attachments: JDO-568.patch
>
>
> The subquery test cases currently fail, because JPOX does not yet support
> subqueries:
> [java] RUN CorrelatedSubqueries.testPositive ERROR
> [java] RUN CorrelatedSubqueriesWithParameters.testPositive ERROR
> [java] RUN MultipleCallsReplaceSubquery.testPositive ERROR
> [java] RUN NonCorrelatedSubqueries.testPositive ERROR
> [java] RUN NullCandidateCollectionExpression.testPositive ERROR
> [java] RUN NullSubqueryParameter.testPositive ERROR
> [java] RUN UnmodifiedSubqueryInstance.testPositive ERROR
> Here is the corresponding JPOX JIRA:
> http://www.jpox.org/servlet/jira/browse/CORE-3207.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.