• Post Reply 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

HFEJB 429 Q13

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In HFEJB 429, Q13,
What's true about EJBQL Path Expression?
one of the correct answer is
B) Path Expression can terminate with either cmr-field or cmp-field.
I'm getting confused with the description in page 406 which says we can't use cmr-field for single valued path expression? Am i missing something here?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my understanding select m.director from MovieSchema m is correct, as long as m.director is not a collection type.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It says "you can't use dot notation to return a CMR field". It doesn't mean Path Expression can't terminate with cmr-field. e.g, assume Director is a CMR field, so you can't say:

Select m.Director from.... (this is to "return" CMR field using dot)

but you can say:
Select *** from **** WHERE [I]a.Director[I] IS NOT EMPTY (this Path Expression terminates with cmr-field )

X. Li
 
gopi chillakuru
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to the spec page:239,240, Select clause can have single valued expression or Object(identifier).

select_clause ::=SELECT [DISTINCT ] {single_valued_path_expression |
OBJECT (identification_variable)}
single_valued_path_expression ::=
{single_valued_navigation | identification_variable}.cmp_field |
single_valued_navigation
single_valued_navigation ::=
identification_variable.[single_valued_cmr_field.]* single_valued_cmr_field

I think "You can't use dot notation to return a Collectiontype CMR field"
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic