my dog learned polymorphism*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Q. EJB-QL SELECT - when to use Object() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Q. EJB-QL SELECT - when to use Object()" Watch "Q. EJB-QL SELECT - when to use Object()" New topic
Author

Q. EJB-QL SELECT - when to use Object()

Karin Paola Illuminate
Ranch Hand

Joined: Oct 18, 2002
Posts: 109
Who knows the "Sharpen your pencil" answers? I can't find them on the Oreilly web site.

Circle the EJB-QL statement if it has a legal SELECT clause
SELECT OBJECT (m) FROM MovieSchema m
SELECT m.title FROM MovieSchema m
SELECT m from MovieSchema m
SELECT OBJECT (m.title) FROM MovieSchema m


Thanks in advance.


I not only use all the brains that I have, but all that I can borrow. [Laurence J. Peter]
Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
Circle the EJB-QL statement if it has a legal SELECT clause
SELECT OBJECT (m) FROM MovieSchema m - ok
SELECT m.title FROM MovieSchema m - ok
SELECT m from MovieSchema m - not ok - must use OBJECT(m)
SELECT OBJECT (m.title) FROM MovieSchema m - not ok,
OBJECT can't use cmp or cmr field

Basically if you use Object only when you want the every thing in the abstract schema (instead of field) to return. Note that it is case INsensitve.

Shiang


SCBCD, SCWCD, SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Q. EJB-QL SELECT - when to use Object()
 
Similar Threads
2 questions about EJB-QL
regarding EJB QL
Chapter 7 - HF study group
EJB spec conflicts - CMR field return types
HF EJB question 17 on page 430