Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Select Clause Returning CMR Field

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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?
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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: https://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 ]
 
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic