-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: many-to-many mapping question
PostPosted: Fri Aug 04, 2006 3:09 am 
Regular
Regular

Joined: Mon Mar 06, 2006 6:18 am
Posts: 95
Location: Bern, Switzerland
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.