| Hi,
I want to create a DetachedCriteria query using Hibernate3.1
 the query is on collection of obects.
 For eg
 
 Search for A where childrens B are b1 and b2;
 
 DetachedCriteria EmpCriteria = DeptCriteria.createCriteria("EmpCollection");
 EmpCriteria.add(Restrictions.gt("age",new Float("50")));
 DetachedCriteria ManagerCrit = EmpCriteria.createCriteria("manager");
 ManagerCrit.add(Restrictions.eq("name","XYZ"));
 
 Above condition is on one object of collection similarly i want to more such conditions such as
 
 EmpCriteria.add(Restrictions.gt("age",new Float("30")));
 DetachedCriteria ManagerCrit = EmpCriteria.createCriteria("manager");
 ManagerCrit.add(Restrictions.eq("name","ABC"));
 
 Is there any way to for DetachedCriteria which satisfies the query on collection such as Give Dept which is associated with Empl
 (age>30 and which is associated with Manager(name='XYZ'))  AND
 (age>50 and which is associated with Manager(name='ABC')) ?
 
 ~Sachin
 
 
 |