File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply locked New topic

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

Joined: Aug 26, 2001
Posts: 7610

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:

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

[Blog] [Blogroll] [My Reviews] My Linked In
I agree. Here's the link:
subject: Select Clause Returning CMR Field
It's not a secret anymore!