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: Parent/Child Mapping withComposite Keys and Sequence Number
PostPosted: Mon Aug 07, 2006 12:45 am 
Newbie

Joined: Mon Aug 07, 2006 12:34 am
Posts: 1
I have a parent table which has two composite keys: ID and NetworkCD

I need to created an many to one relationship in the parent to the child table. However the child table has an Sequence Number and also ID and Network Code are foreign keys my two question are?

1. What is the best way to create the relationship to the child in the parent mapping file.

2. In the child mapping how do you recognize and sequence number and foreign keys in the mapping file?

Currently I recieve an error saying...
Foreign key in "child table" must have same number of columns as referenced primary key in "parent table".

Im assuming this is happening because I have not identified the ID and Network Code in the child table as primary keys, however this child table has an sequence number as well.

Please advise.


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.