wolli wrote:
Is home and alternative address mutually exclusiv ? Then you can use a one-to-one association between Person and PersonToAddress. If not, you need the bag. Or do you have two properties on Person, one for the home address and a second one for the optional alternative address ? In that case you can try two many-to-one associations from Person to PersonToAddress, each with a "where" clause in the mapping, which contains the constraint for the address type.
I have two properties on the Person entity - HomeAddress and AlternativeAddress. Using two many-to-one associations from Person to PersonToAddress - what would the mapping look like?
Cheers.
FlyTVR