-->
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.  [ 2 posts ] 
Author Message
 Post subject: 2 columns in table have same foriegn key
PostPosted: Tue Feb 17, 2004 12:42 am 
Newbie

Joined: Tue Feb 10, 2004 12:03 am
Posts: 16
I have this strage situation where 2 columns in my table has same foriegn key.


Table A
Id
Type_id
CreatedDate
updatedDate
StatusID

Table B
Id
Label
Value


here type_id and StatusID of Table A refer to Id(primarykey) of Table B

in Java VO of table A i defined table B definitions with 2 different signatures and in my *.hbm.xml file i defined two <many-to-one> elements refereing to the same column like below

<many-to-one name="TableA" columns="Type_id">
<many-to-one name="TableOfA" columns="StatusID">

and when i builld the configuration i get error as Duplicate import of Table A.


does any one came across this kind of problem... if so please help to solve this.

PS: both the column values in the Table A will have different values, though they refere to the same column


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2004 2:43 am 
Newbie

Joined: Tue Feb 10, 2004 12:03 am
Posts: 16
Never mind... i got it working....


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

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.