Title: Message

Kevin,

Actually it is 1-n relationship.

I have 2 tables , BusinessObject (with Object_Id as PK) and Attribute

BusinessObject has Attribute List.

Attribute has Object_Id as FK.

I need to get a BusinessObject for which Attribute value is something ***

 

Thanks

Abhay

 

-----Original Message-----
From: Smith, Kevin [mailto:[EMAIL PROTECTED]]
Sent
:
Wednesday, May 15, 2002 12:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Querying parent depending on child value

 

Do you mean something like this:

 

select p from com.blah.Parent p where p.child.someValue = $1

 

If so, that's definitely possible for one-to-one parent/child relationships. I haven't quite figured out how to do one-to-many parent/children using OQL.

 

--Kevin

-----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