Hi all,
On page 428, Q 12 says-
Given CMP bean customerBean, orderbean, lineitembean with following relationship...
customerbean (1)<--> orderbean(n)
orderbean (1)<--> lineitembean(n)
Which will return all orders that have line items ?
the correct ansers are -
B. SELECT DISTINCT OBJECT(o) FROM order o IN (o.lineitems)li
D. SELECT DISTINCT OBJECT(o) FROM order o
I feel these answers are wrong. The questions says that orders that
have line items. so the query should be...
SELECT DISTINCT OBJECT(o) FROM order o where o.lineitems
IS NOT EMPTY Same type of query is written on page 418, where director has many movies and you want to select all directors having movies associated.
Can someone explain the above metioned answers in HFE?
