hi, guys.
i got some questions in HFE.
No 12 on page 434 of HFE,it's about the
EJB QL.
the question is
-----------------
Given CMP beans CustomerBean, OrderBean, and LineItemsBean with the following relations;
CustomerBean(1)<--> OrderBean(n)
OrderBean(1)<-->LineItemsBean(n)
which will return all orders that have line items?
a. select distinct 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 answer is b, d. but i think there is no answer.
and a,c is incorrect and i can know why.
but b,d also there is some problem as i think.
on B, there is no 'where' clause, so the result is all order objects(no duplicate).
on D is as same reason to b.but could be duplicated.
does anybody know?