persistence@glassfish.java.net

Re: JPQL: subquery changes

From: Tom Ware <tom.ware_at_oracle.com>
Date: Mon, 20 Mar 2006 16:17:14 -0500

Hi Michael,

  These changes look good to me.

  We will definitely have to ensure CTS passes with these changes. Let
me know if you want me to include these changes in our next CTS run.

-Tom

Michael Bouschen wrote:

>Hi Tom,
>
>attached are my changes for better subquery support. With these changes
>the SelectGenerationContext created for a subquery does not share its
>expression cache with the one for the outer query. Instead it generates
>an Expression.equal call for all variables used in the subquery that are
>declared in the outer query, e.g. the variable c in the following examples:
> SELECT c FROM Customer c WHERE EXISTS (SELECT o FROM c.orders o)
> SELECT c FROM Customer c WHERE EXISTS
> (SELECT o FROM Order o WHERE o.customer.name = c.name)
>
>Please have a look, thanks!
>
>Regards Michael
>
>

-- 
Tom Ware
Principal Software Engineer
Oracle Canada Inc.
Direct: (613) 783-4598
Email: tom.ware_at_oracle.com