• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Mock exam question doubt - q.11 p.428

 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you nailed this one too.
 
Alex Sharkoff
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Nathaniel.

Do you think we should report it to book's errata?
[ June 30, 2004: Message edited by: Alex Sharkoff ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, actually, EJB-QL is NOT case-sensitive - see the 'watch out' box on pg. 410
 
I'm still in control here. LOOK at this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic