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".
>
===========================================================================
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".