Hi,
Good question. I believe what is mis-leading is the use of the <--> arrows (which to me, on first glance means bi-directional, n-m relationship). What I had to look for was the (1) and the (n). Looking at the spec, and at the question, to me D is incorrect!
Basically, what it is saying is that:
An Order can contain many LineItemsBeans
i.e., it's a 1 to Many relationship.
So, to explain the answers.
Why is A incorrect?
Because it doesn't have Object(o), and we are selecting objects.
Why is B correct?
It is correct because the select is finding all objects from all the orders out there that are of type lineitems.
Why is C incorrect?
That would return Orders that /dont/ have lineItems.
Why is D incorrect?
According to the spec, this select will simply return all OrderBeans, with no qualification that they must contain lineItems. So it would be my understanding that some of the OrderBeans return could contain lineItems and some may not...
Perhaps someone could clarify this?
-=david=-