[ 
https://issues.apache.org/jira/browse/JDO-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562008#action_12562008
 ] 

Andy Jefferson commented on JDO-568:
------------------------------------

Comment on "NullSubqueryParameter", the JDOQL that JPOX runs is 
SELECT FROM org.apache.jdo.tck.pc.company.Employee
WHERE this.weeklyhours > emp.weeklyhours && emp.firstname == 'emp1First' 
VARIABLES Employee emp

which seems correct to me, based on the comments of the test about what a null 
subquery parameter means. This is then converted into the following SQL

SELECT {...}
FROM datastoreidentity0.PERSONS THIS , datastoreidentity0.PERSONS UNBOUND_EMP
WHERE (THIS.DISCRIMINATOR = <'org.apache.jdo.tck.pc.company.Employee'> 
    OR THIS.DISCRIMINATOR = <'org.apache.jdo.tck.pc.company.PartTimeEmployee'> 
    OR THIS.DISCRIMINATOR = <'org.apache.jdo.tck.pc.company.FullTimeEmployee'>)
AND THIS.WEEKLYHOURS > UNBOUND_EMP.WEEKLYHOURS
AND UNBOUND_EMP.FIRSTNAME = <'emp1First'>

Maybe the UNBOUND_EMP should have a discriminator restriction, but apart from 
that ?

> 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.

Reply via email to