aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Q. EJB-QL SELECT - when to use Object()
 
Similar Threads
EJB spec conflicts - CMR field return types
regarding EJB QL
2 questions about EJB-QL
HF EJB question 17 on page 430
Chapter 7 - HF study group