-->
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: mapping one column to two different tables
PostPosted: Wed Dec 23, 2009 11:55 am 
Newbie

Joined: Wed Dec 23, 2009 11:38 am
Posts: 1
hi, I'm using netbeans and hibernate. I have three tables (A table,B table,C table,) and a column in A table is the foreign key of the id column of B and C table.My mapping file of the A table includes
Code:
<many-to-one name="ctable" class="Mapping_classes.Btable" fetch="select">
            <column name="g_id" not-null="true" />
</many-to-one>
<many-to-one name="ctable" class="Mapping_classes.Ctable" insert="false" update="false" fetch="select">
            <column name="g_id" not-null="true" />
  </many-to-one>

netbeans generates this code automatically.But if I want to insert the record using Ctable , it doesn't work.What should i do?


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.