Hi,
Can I apply Criteria on sets?
Let us consider the following:
ContainerClass {
ContainedClass cc;
ContainedSet cs;
}
To filter on attributes of ContainerClass cc, I would do create a criteria for cc and use it to choose my filtering criteria.
criteria = session.createCriteria(ContainerClass.class)
ccCriteria = criteria.createCriteria("cc");
ccCritera.addExpression(....); //to filter on some attributes of cc
etc....
cs is a set of objects and I want to search based on the attributes of the objects in that set. Does Hibernate support what I am looking for? If so, how will the pseudo code look like ?
Thanks much.
Regards,
Raghu
|