I'm a little confused.
For those who don't have "the book", there's a question that goes like this on page 434 (number 12):
"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? (Choose all that apply.)
A. SELECT DISTCINT o from Order o, IN( o.lineItems) li
B. SELECT DISTINCT OBJECT(o) From Order o, IN(o.lineItems) li
C. SELECT OBJECT(o) FROM Order o Where o.lineItems = 0
D. SELECT OBJECT(o) FROM Order o
The
book says that both B and D are valid, but I'm a little confused about D. Is my confusion because of semantics (all orders include all orders with line items) or a concept I'm not grasping?
Thanks for your help!
--Jeff