This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To bert bates about Head first EJB

 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bert
I was going through your Head First Book. In Entity bean mock exam session i have one confusion in ques 12 which says
Given CMP beans CustomerBean,OrderBean, and LineItemsBean with the following relationships:
CustomerBean(1) ---- OrderBean(n)
OrderBean(1) ----- LineItemsBean(n)
Which will return all orders that have line items?
The answer given are

B. SELECT DISTINCT OBJECT(o) FROM Order o,IN(o.lineItems)li

D. SELECT OBJECT(o) FROM Order o.

How can D be right because D will return even those orders taht have no line items??
Plz clarify if possible
Thanks
kundan
 
Jef Cumps
cowbird
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option D will indeed return ALL orders. And since orders with lineitems are a subset of ALL orders, option D will return all orders having lineitems.

It's about the interpretation of the question, they didn't ask you which option would ONLY return orders having lineitems.
 
Nileesha Bojjawar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thats a Tricky question.
So every word in the Question matters.

Thanks for letting us Know.
 
Jef Cumps
cowbird
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, indeed, every word in the question matters ! But don't get afraid of the real exam, the questions are not made as tricky as can be, most of them are really clear and just test your knowledge, not your trick-awareness...
 
kundan varma
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you r right jeff , sometimes simple thing skip from the mind.
THanks
kundan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic