Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

To bert bates about Head first EJB

 
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
 
cowbird
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.
 
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
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
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic