|
----- Original Message -----
From: Raymond
Roestenburg
Sent: Tuesday, July 29, 2003 11:27 AM
Subject: [castor-dev] Restricting number of children returned in
one-to-many query Hi,
I have an OQL query like this:
"select c from CompositeMemberBean c where c.types.uniqueId = 372" this is a one to many query, where compositeMemberBean is mapped to Member table , and property types is mapped to MemberType table. the foreign key in membertype table is not the uniqueId property, but a memberid field that links as a foreign key to the primary key of member. the uniqueId property has sa unique constraint. (it is the primary key of the membertype table) Member is the master, MemberType the detail. this query works fine, it returns a compositememberbean, but when i look in the compositememberbean for the 1 type it should return (because the uniqueId in the query is primary key for membertype) I still get all the membertype records that are linked to the member through the foreign key. How can I restrict the number of child elements so that it does not always give me the amount of children per master, linked by foreign key? (for instance an extra restriction like the above example) or is this not supported? Thanks, Raymond
|
