Thanks for your pointer Murugesan, but the HQL is not the problem here, I got that part all right up and running. The thing is that I want to replace the query with an criteria and I guess it would look something like this:
session.createCriteria(A.class, "a") .createCriteria("a.listOfB", "b", Criteria.LEFT_JOIN) .add(Restrictions.eq("a.id", 1))
My problem is that this will give me a list of "a" with the same size as the number of "b" belonging to "a" with a.id=1, but what I'm looking for is a list of "b".
//Swanthe
|