-->
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: org.hibernate.MappingException: Foreign key
PostPosted: Thu Jan 29, 2009 11:11 pm 
Newbie

Joined: Thu Jan 29, 2009 10:55 pm
Posts: 1
Hi,

I am having problem mapping tables for one-to-many relationship. I have a table A which has composite key containing 5 columns. I have a table B which also has the composite key containing 5 columns. However, there is no relationship between these tables (why somebody would design like this but they did). Since these composite keys have three columns common in them, I want to establish one-to-many mapping between table A and B using only these three columns. But when I do that, I get the following error message.

org.hibernate.MappingException: Foreign key (table B)must have same number of columns as the referenced primary key (table A).

Please reply if you have a solution to this kind of problem.

Thanks


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.