persistence@glassfish.java.net

Re: EJB QL reserved identifiers

From: Michael Bouschen <Michael.Bouschen_at_Sun.COM>
Date: Thu, 16 Feb 2006 20:13:24 +0100

Hi Linda, hi Mike,

thanks for the clarification!

I have another question about reserved identifiers. Chapter "4.4.1
Identifiers" defines that reserved identifiers must not be used as
identification variables. Is it legal to access a persistent field
having the same name as a reserved identifier? Suppose the entity class
Customer has a field called from. Is the following legal?
   SELECT c FROM Customer c WHERE c.from = ?1

Regards Michael

>
>
> Michael Bouschen wrote:
>
>> Hi Linda, hi Mike,
>>
>> a minor spec remark: chapter "4.4.1 Identifiers" still includes
>> BIT_LENGTH, POSITION, CHAR_LENGTH, and CHARACTER_LENGTH in the list of
>> reserved identifiers in EJB QL. I think these have been removed from
>> EJB QL. The keyword BY is listed twice: after GROUP and after ORDER.
>>
>> Regards Michael
>>
>
> Thanks! It is ok to have these reserved. In general we do not
> want people to use reserved SQL key words.
>
> regards,
>
> Linda