Linda,
Your explanation is appreciated. However, it fails to address the purpose of
the OBJECT( ) operation in EJB QL and why its applied inconsistently. To be
perfectly frank it looks like it was thrown in as an after thought. Why is it
needed? Why wouldn't it be needed for SELECT paths that end in a cmr field
type?
I can understand why EJB QL follows many SQL conventions, but the way the
OBJECT( ) operation is used in EJB QL is bizarre. What does it mean? If you
can not justify the use of OBJECT() operation, then I suggest that you remove
it.
Richard
Linda DeMichiel wrote:
> Richard,
>
> The OBJECT keyword was added to EJB QL at the request of a number of
> the members of the EJB Expert Group who are also active in the SQL
> standards area and who are helping us with alignment between EJB QL
> and SQL200N.
>
> One of our goals with EJB QL has been to avoid unnecessary differences
> between EJB QL and SQL--which we expect will make the lives of both
> vendors and programmers easier, especially as we evolve and expand EJB
> QL in the future. The use of a standalone range variable in the SELECT
> clause is such an incompatibility from the SQL point of view.
>
> regards,
>
> Linda
>
> >X-Accept-Language: en
> >MIME-Version: 1.0
> >Content-Transfer-Encoding: 7bit
> >Date: Thu, 24 May 2001 10:24:27 -0500
> >From: Richard Monson-Haefel <[EMAIL PROTECTED]>
> >Subject: EJB 2.0: Why OBJECT( ) operator in EJB QL?
> >To: [EMAIL PROTECTED]
> >
> >The EJB QL OBJECT( ) operator is bizarre. Why is it required?
> >
> >Seems to me that any decent translator should be able to determine when
> >a abstract schema type is returned. The OBJECT( ) operator is not
> >necessary. The fact that you don't use it with paths, even if the path
> >ends in a cmr field, makes it seem even odder.
> >
> >What's the problem with declaring a EJB QL like the following?
> >
> >SELECT c FROM Customer c
> >
> >Why is the following required by the spec?
> >
> >SELECT OBJECT( c ) FROM Customer c.
> >
> >Why don't paths use OBJECT( ) if its so necssary?
> >
> >// legal
> >SELECT c.address FROM Customer c
> >
> >// illegal
> >SELECT OBJECT ( c.address ) FROM Customer c.
> >
> >The whole thing needs an explanation. I'm guessing that none of the
> >vendors can provide a scenario where it makes sense.
> >
> >Richard
> >--
> >Richard Monson-Haefel
> >Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000)
> >Co-Author of Java Message Service (O'Reilly 2000)
> >http://www.jMiddleware.com
> >
> >===========================================================================
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> >of the message "signoff EJB-INTEREST". For general help, send email to
> >[EMAIL PROTECTED] and include in the body of the message "help".
> >
--
Richard Monson-Haefel
Author of Enterprise JavaBeans, 2nd Edition (O'Reilly 2000)
Co-Author of Java Message Service (O'Reilly 2000)
http://www.jMiddleware.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".