-->
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: Composite Keys that shares the same columns
PostPosted: Mon Nov 29, 2010 3:43 am 
Newbie

Joined: Tue Nov 23, 2010 9:42 am
Posts: 3
Please excuse my bad english.

Our legacy Database use a lot of composite keys for joining tables. Now I have problems with defining ManyToOne relationships that uses the same columns for different associations to other entitys.

For example we have an Order Entity with the mapping to customer (cust_id), standard shipping-adress of the customer (cust_id, shipAdr_id) and customer-contact (cust_id, contact_id). If I declare all three relationsships as @ManyToOne with the cust_id, I get a "Repeated column in mapping for entity" Exception. If I declare the standard shipping-adress and customer-contact with updatable/insertable as false, shipAdr_id and contact_id will not be updated because declaring cust_id with updatable/insertable to false and shipAdr_id and contact_id with true is not possible.

Is it not possible to use updatable composite keys that shares the same columns in Hibernate?


Top
 Profile  
 
 Post subject: Re: Composite Keys that shares the same columns
PostPosted: Tue Nov 30, 2010 3:54 am 
Newbie

Joined: Tue Nov 23, 2010 9:42 am
Posts: 3
Any suggestions, do no other have this problem?


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.