jamie_dainton wrote:
I'd have an object called Relationship which has two properties, lover1 and lover2. Or if you're really adventurous it could have a set of People for relationships involving more than one person.
Person ---- Relationship ----- Person
With each person being able to belong to 0 or more relationships. Then if a relationship becomes unbalanced it can be deleted.
I know, but how I model this in Hibernate.
I can use a Set in Person, but the link to LOVERS is to a specific column (lover1).
What I want is to link to lover1 OR lover2. How I write this in a .xml.hbm?
Thank anyway