wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEJB 429 Q13 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)
Bookmark "HFEJB 429 Q13" Watch "HFEJB 429 Q13" New topic
Author

HFEJB 429 Q13

saran ram
Ranch Hand

Joined: Dec 13, 2002
Posts: 69
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?
gopi chillakuru
Greenhorn

Joined: Dec 17, 2004
Posts: 14
In my understanding select m.director from MovieSchema m is correct, as long as m.director is not a collection type.
X. Li
Ranch Hand

Joined: Jan 31, 2004
Posts: 61
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

Joined: Dec 17, 2004
Posts: 14
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"
 
wood burning stoves
 
subject: HFEJB 429 Q13
 
Similar Threads
Mock exam question doubt - q.11 p.428
Mock Question HFEJB page 436. Q17.
EJB QL path expression
HFEJB P406 - Why EJBQL SELECT Cant Return Single Valued CMR field?
HFEJB EJB relationship question