This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
 
Don't get me started about those stupid light bulbs.
 
subject: Q. EJB-QL SELECT - when to use Object()