persistence@glassfish.java.net

Re: EJBQL: question about identification variables in subqueries

From: Linda DeMichiel <Linda.Demichiel_at_Sun.COM>
Date: Thu, 08 Dec 2005 08:39:53 -0800

I think ideally we should follow the SQL requirements here.
If they allow shadowing of range variable in subqueries,
*and* it is an issue in implementation, we could make
the restriction without loss of functionality.
I think supporting this might be confusing anyway, given
that range variables in outer scopes are used in
correlated subqueries.

Linda



Michael Bouschen wrote:

> Hi Linda, hi Mike,
>
> does a subquery open a new scope for the declaration of identification
> variables or with other words is it legal that a subquery defines an
> identification variable having the same name as an identification
> variable defined in the outer query?
>
> Thanks!
>
> Regards Michael