Hello,
I have a simple HQL question. I wish to build a query that will allow me to look for a child collection.
For example, I have a collection of kittens and wish to test which cats have these kittens.
I would like to be able to do something like this:
Code:
String query = "select cat from Cat as cat join cat.kittens as kittens where kittens = " + cat.getKittens()");
How can I do this? Or is there another way?
Thank you
PS: if you also have an idea on how to do this in Criteria form, I'd be happy to know how