-->
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: Disabling foreign keys for columns with multiple meanings
PostPosted: Tue Jan 25, 2005 3:24 pm 
Newbie

Joined: Thu Aug 19, 2004 10:52 am
Posts: 14
Hibernate version:
Hibernate3

I am trying to map a legacy database that uses the same column for multiple meanings. Specifically, the 'link_id' can refer to either one of three different tables, based on a discriminator value.

Now, the obvious way of modelling this is polymorphism.... the problem is that when I do that, hibernate creates foreign key associations to all three different tables. This obviously fails, since the existance of a link_id value in one table does not imply that it exists in the other two.
Is there are way of disabling foreign key generation for a particular mapping?


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.