Hi folks,
I've seen on this tutorial:http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-associations
how to use a bridge table in hibernate mapping.
S it looks like that:
Code:
<class name="events.Person" table="PERSON">
<id name="id" column="PERSON_ID">
<generator class="native"/>
</id>
<property name="age"/>
<property name="firstname"/>
<property name="lastname"/>
<set name="events" table="PERSON_EVENT">
<key column="PERSON_ID"/>
<many-to-many column="EVENT_ID" class="events.Event"/>
</set>
</class>
with the following schema:
EVENT <-> PERSON_EVENT <-> PERSON
*EVENT_ID *EVENT_ID *PERSON_ID
*EVENT_NAME *PERSON_ID *PERSON_NAME
where PERSON_EVENT is the bridge table between EVENT and PERSON.
My issue is that I've got the following schema :
EVENT_ID <-> PERSON_EVENT <-> PERSON
*ID *EVENT_ID *PERSON_ID
*EVENT_NAME *PERSON_ID *PERSON_NAME
So how can I configure my mapping to use this bridge table ?
Thanks for your help,
Sven