hi, as far as i understand this, you try to differentiate by the value of "adress.type" whether an adress is a home wor work adress? well, i have no solution for that, but i tried it here with a similair data structur, and it didn't work either. to be honest i'm not sure if this is the intended use for <attribute> in <collection-descriptor> or <reference-descriptor>, because i didn't find anything in the docs. all i found was an example in the ojb test cases in repository_junit.xml, but the corresponding source code didn't tell me anything i could understand.
so, long speach, short meaning: i'm also interested in a solution for that! kr, guenther -----Original Message----- From: Georg M�ller [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 9:24 PM To: [email protected] Subject: Mapping question Hi, I have an object "User" who has 2 addresses, home and work. User is mapped to a table user (no problem here). Both home and work address are mapped to a table address. This table has a composite primary key: login and type - login from table user as a foreign key - type is a string (or enum) "home" and "work" I have tried the following without success: in User description: <reference-descriptor name="homeAddress" class-ref="Address" auto-update="true" auto-delete="true"> <attribute attribute-name="type" attribute-value="heimat"/> <foreignkey field-ref="login" /> </reference-descriptor> and in Address description: <field-descriptor name="login" column="login" primarykey="true" /> <field-descriptor name="type" column="type" primarykey="true" /> Is it possible to make it run anyhow? Regards, Georg P.S.: Please CC me --------------------------------------------------------------------- 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]
