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

Reply via email to