Hi, i need somebody help.
In my case, i have two objects(parent, child) and i want to retrieve parent.name and child.name by a search criteria.
parent model
----------------
String name
List childList
child model
--------------
String name
Critetria crit = sess.createCriteria(parent.class);
crit.add(Expression.eq("name","parentNameValue");
crit.add(Expression.eq("childList.name","childNameValue");
but i got a error mention that can't found 'childList.name' from parent.class. how to solve this problem?
|