Hi there.
My simplified Entity Scenario is as follows:
A PERSON is associated to a COMPANY in a specific ROLE (yawn).
My first thought was to configure a ManyToMany relationship between PERSON and COMPANY. However and apparently, I can not include the type of ROLE in the ROLE table that way (as another field the two foreign keys).
I acknowledge that the right way to do this is to use two OneToMany relationship and include the ROLE as an entity on its own (answered already on stackoverflow).
But this is where I am stuck: I use an html form to add a person to a company and select the adequate role, how do I save this to the database or better: how do I tell Hibernate to save it. A Person has a List and so does the Company. A Role has a Person and a Company. How do they meet in the middle? So basically what I am asking:
How is the exact Hibernate mapping configuration so that I can save a Person with a Role in a Company in one step?
Thank you so much and keep in mind: the Hibernate docu is down at the moment. :)
Wolfram