Hi
I have class A having a set of Class B.
Class B have id,prop and another Class C mapped as many-to-one
Class C have id,name among others.
Now I want to construct a Criteria or Query preferably a Criteria
to fetch me all the A's whose B's must have b.prop=100 and b.c.id=2 and b.prop=200 and b.c.id=3. I have put the emphasis on the and because I need only those A's who's B satisfy both condition ie if a B of an A satisfy one condtion another B of the same A should satisfy the other condtion.
In simple word the query is
Fetch all A's whose Bs must have a B which satisfy prop=200 and cid=3 and another B which satisfy prop=100 and cid=2
Thanks
|