If the collection of B objects is named "collectionProperty"
Criteria crit = new Criteria(); crit.addEqualTo("collectionProperty.name", "foo"); QueryByCriteria query = new QueryByCriteria(A.class, crit); Laran Evans wrote:
I have a parent object A which owns a collection of child objects of class B. B has a name attribute. How do I run the query "get me all A where one or more of the Bs owned by that A has a name attribute equal to 'Leroy Jenkins'". I've been looking through the various 1:n documentation sections on db.apache.org and haven't found anything that I think covers this. Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]