posted 18 years ago
This is a question from the final mock exam of HFEJB. I am going for exam tomorrow morning, so it will be greatly appreciated if someone can answer this before tomorrow morning (to be more specific, in around 7 hours from now on)
The Q58 of HFEJB:
Given CMP beans CustomerBean(CB), OrderBean(OB) and LineItemsBean(LIB) with relationships:
CB(1) -> OB(n)
OB(1) -> LIB(n)
Which will return set of customers that have orders?
Correct answer given is:
select distinct object(c) from Customer c, Order o where c.custnum=o.custnum.
How is this a valid query??? Customer to Order is 1 to many, so the right query should be
select distinct object(c) from Customer c, IN (c.Order) o;
See the similar example given on page 236 of the spec?
Can someone please check and comment on this?