persistence@glassfish.java.net

Re: JPQL: subquery changes

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Mon, 20 Mar 2006 18:33:37 -0800

Tom,

If you have the results late tonight, and it's positive, Michael will
be able to check in his changes before HCF cut-off time.

thanks,
-marina

Tom Ware wrote:
> 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
>>
>>
>