wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Select Clause Returning CMR Field 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)
Reply locked New topic
Author

Select Clause Returning CMR Field

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
HFEJB P406, in the box it says: You can't use dot notation to return a CMR field e.g.

SELECT m.director FROM...

is invalid if 'director' is CMR field.

But, I went thru Richard Monson-Haefel's EJB book P237 where there is an example like this:

SELECT c.creditCard.creditCompany.address FROM Customer As c

'creditCard', 'creditCompany' and 'address' are all related CMR fields.

And the book says we can put CMR field in SELECT clause if it returns a single type.

So who is correct?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Alec,

You have already started a topic with this question, why not resurrect it instead of creating a new one?

I'm closing this thread. You can continue this discussion at: http://www.coderanch.com/t/159465/java-EJB-SCBCD/certification/HFEJB-Why-EJBQL-SELECT-Cant

Thank you for your comprehension
[ July 09, 2004: Message edited by: Valentin Crettaz ]

SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Select Clause Returning CMR Field
 
Similar Threads
HF-EJB: doubt regarding EJB-QL
HFEJB 429 Q13
HFEJB P406 - Why EJBQL SELECT Cant Return Single Valued CMR field?
Last Minute Beta Tips
EJB QL - returning collection