-->
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: Multiple Foreign Keys using one column
PostPosted: Tue May 18, 2004 3:49 pm 
Newbie

Joined: Sun Apr 18, 2004 11:12 pm
Posts: 3
Location: Waltham, MA
Question:

Does Hibernate support the following table relationships?

Table A,
columns a,b,c,d,e
PK col a, col b
1. FK col a,c -> B.a,B.b Foriegn key to table B
2. FK col b -> C.a Foriegn key to table C
3. FK col a,d -> D.a,D.b Foriegn key to table D

note: same column is beening used in all tree Foreign keys.
(I know that I can't map the same column more than once (without insert=false, update=false))
I am using key-many-to-one element for case 1.
I am using key-property element for case 2.
what do I do for case 3???

Table B
columns a,b,c,d,e
PK cola, col b

Table C
columns a,b,c,d,e
PK col a

Table D
columns a,b,c,d,e
PK col a,col b


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.