SELECT p FROM Parent p WHERE  p.Child.aField = $1
 
This should select all of the Parents whose children have aField equal to
whatever you bind in $1
 
-----Original Message-----
From: Abhay Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Querying parent depending on child value

Hi

 

I need to query for parent depending on value of one of the child table column. I have parent-child relation defined in XML mapping. How do I build the query using OQL ? Is it possible for OQL to select parent using filter for child ?

 

Thanks

Abhay

Reply via email to