Hi all,
I need to submit a hibernate Query (HQL or criteria-based), that will query on some property of an object in an entity's member collection. I'm probably not using the terminology correctly, but to use the HQL reference manual's ubiquitous Cat/Kitten example, I basically need the Hibernate equivalent of:
Code:
Select distinct cat from Cat cat where cat.kittens.name is not null
This is completely wrong of course, but the goal would be to return a list of cats that have at least one kitten whose name is not null.
Can anyone tell me how to do this? It's dead simple in SQL, but I can't figure it out using session.CreateCriteria (or HQL, for that matter).
thanks!