hi all
till now i had a simple many-to-many mapping with a mapping table that contains only two columns (the foreign keys to the other tables):
Table: TTRANSAKTION_AKTION
- FK_TAKTION_ILAUFNR
- FK_TTRANSAKTION_ILAUFNR
The mapping was defined like that:
Transaktion.hbm.xml
Code:
<set name="aktionsSet" table="TTRANSAKTION_AKTION" fetch="join" cascade="all" >
<key column="FK_TTRANSAKTION_ILAUFNR" />
<many-to-many column="FK_TAKTION_ILAUFNR" class="najsre7.model.Aktion" />
</set>
Aktion.hbm.xml
Code:
<set name="transaktionen" table="TTRANSAKTION_AKTION" fetch="join" inverse="true" >
<key column="FK_TAKTION_ILAUFNR" />
<many-to-many column="FK_TTRANSAKTION_ILAUFNR" class="najsre7.model.Transaktion" />
</set>
So hibernate automatically updated this mapping table. But now i need to add more cloumns to this mapping table
Table: TTRANSAKTION_AKTION
- FK_TAKTION_ILAUFNR
- FK_TTRANSAKTION_ILAUFNR
- MUTUSER
- STVUSER
- MUTDATUM
Whats the best way to do this mapping now? Do i have to create a additional Mapping file and a class ? Or is there a better solution?
Regards
Angela