-->
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: composite primary key shares column with composite foreign
PostPosted: Mon Jul 25, 2011 8:29 am 
Newbie

Joined: Fri Jul 15, 2011 2:54 pm
Posts: 2
I have the following problem:

Let's say I have a table with a composite primary key consisting of columns A and B.
The same table has a composite foreign key consisting of columns B and C.
Note that column B is shared between the PK and FK.

Setting up the PK is no problem at all, but the FK is causing trouble because it overlaps the PK.
If I set up the foreign key with insert="false" update"false" then column C only contains nulls,
If I omit the insert="false" update"false" then Hibernate complains about column B being declared twice.
The XML schema won't let me specify insert="false" update"false" for column B but not C.

any suggestions?


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.