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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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 ]
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic