Hi,

I have this object model: a Partner object, which holds a relation
one-to-many with Adress Objects.
I would like to give the user the possibility to perform searches on the
database, such "give me all the Partners, which live in Paris" and return a
"resultset" holdings the partern with this property AND only their Paris
adress/adresses.
For example, if I had in my database the following records:

Partner table:
PartnerID:     5
Name:          Duck

Address table:
AddressID:     10
PartnerID:     5
City:          Paris
Street         Rue de la Concorde 5
Country:  France

AdressID: 17
PartnerID:     5
City:          Berlin
Street         Alexanderplatz 12
Country:  Deutschland

I'd like to get Partner 5 with ONYLY, in its address collection, the adress
number 10 and not also the adress 17.
Is it possible?

Thanks a lot for you help.
Patrick

PS: In my mapping file I've the partner class holding a collection of
adresses, which are dependent to the partner class.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to