Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.0.5
Name and version of the database you are using:
Oracle 9i
I appologize if this is not the correct place to ask for techniques on solving certain kind of querying problems via Hibernate.
I have a collection of Cat (cats). Now I want to create a Criteria Query on Cat, such that, the Criteria Query will limit its search to the collection I have (cats)
Example:
List cats = getCats();
Criteria ct = session.createCriteria(Cat.class)
.add(Restrictions.in("???",cats));
ofcourse, this mechanism doesnt work, as the Cat class doesnt have a reference to itself.
Are there other ways to do this. It looks so simple, but I cant get a query to work :(
thanks everyone,
cheers!