8
I have two entities i.e Person and Activity. Activity has property status and Person entity contains collection of activities. I'd like to get a list of persons that have all activities with status 'Done'.
Criteria crit = s.createCriteria(Person.class);
crit.createAlias("activities", "act").add(Restrictions.eq("act.status","Done"));
But this return all object with at least one activity with status done. I 'd like to retrive list of person with all activities status set to Done. Can anyone help me?