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)
Sorry for that second posting. I sent this before I subscribed to the
list, so I thought it will not be posted (now, with a latency of nearly
one day)
Regards,
Georg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
Thomas Dudziak wrote:
As far as I understand he wants to use a reference that refers to a
class with a compound primarykey, where one of the foreignkey values
is fixed:
reference-descriptor name=homeAddress
class-ref=Address
auto-update=true
I now have a running version, but the way Thomas proposed would be much
nicer.
I have added a collection descriptor
collection-descriptor
name=addresses
element-class-ref=Adress
auto-update=true
auto-delete=true
inverse-foreignkey field-ref=login/
/collection-descriptor
and he returns