Hi,
I´m using Hibernate 3.2 and I´d like to know how I can to declare a 3rd column in a relationship table, like this:
Class Person:
attributes id, name
Class Scholl:
attributes id, name
If I make a many-to-many between this classes:
Person.hbm.xml:
...
<set
name="scholls"
table="Person_Scholl"
lazy="true"
cascade="none"
sort="unsorted"
>
<key
column="ID_PERSON"
>
</key>
<many-to-many
class="myPackage.Scholl"
column="ID_SCHOLL"
outer-join="auto"
/>
</set>
If I make this mapping, the relationship table Person_Scholl must have two columns: ID_PERSON and ID_SCHOLL.
How can I put a 3rd column in this table (a INFORMATION column) in this mapping ?
Thanks in advanced,
Sergio Stateri Jr.
sergio.stateri@globo.com