This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock exam question doubt - q.11 p.428 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 "Mock exam question doubt - q.11 p.428" Watch "Mock exam question doubt - q.11 p.428" New topic
Author

Mock exam question doubt - q.11 p.428

Alex Sharkoff
Ranch Hand

Joined: Apr 11, 2004
Posts: 209
Hi all,

I have got a doubt in regards to q.11 on p.428 of HFEJB book.

Question lists the following query

select distinct object(c)
from Customer c, in (c.Order) o, in (o.lineItems) li
where li.product_type = 'refrigerator'


I think that this query is invalid because of (c.Order) collection valued path expression - Order cannot be a valid cmr-field as it does not start with the lower case as specified in the spec (section 10.3.1):

The container-managed persistent fields and container-managed relationship fields must be specified in the deployment descriptor using the cmp-field and cmr-field elements respectively.The names of these fields must be valid Java identifiers and must begin with a lowercase letter, as determined by java.lang.Character.isLowerCase.


I have searched the spec hoping that it would tell me that cmr fields are case insensitive when used in ejb-ql path expressions. Could not find anything. As far as I understand only reserved words (eg, unknown/as/not etc.) and identifiers are case insensitive in ejb-ql.

I'd greatly appreciate your thoughts on this subject.



Alex (SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJD 1.4)
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Looks like you nailed this one too.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Alex Sharkoff
Ranch Hand

Joined: Apr 11, 2004
Posts: 209
Thank you, Nathaniel.

Do you think we should report it to book's errata?
[ June 30, 2004: Message edited by: Alex Sharkoff ]
A. Dutra
Greenhorn

Joined: Jul 05, 2004
Posts: 1
Well, actually, EJB-QL is NOT case-sensitive - see the 'watch out' box on pg. 410
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock exam question doubt - q.11 p.428
 
Similar Threads
HF-EJB: doubt regarding EJB-QL
Help Requested --> Yep, it's a verifier message!
Concatenated Primary Key For CMP With CMR
EJB-QL
My Study Notes