-->
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.  [ 4 posts ] 
Author Message
 Post subject: multiple foreign keys
PostPosted: Thu Jun 03, 2004 1:02 pm 
Newbie

Joined: Tue Sep 16, 2003 10:38 am
Posts: 3
Hi

We have a database table that has multiple foreign keys. These keys map in one to one relationship to different tables. How is this relationship mapped in hibernate?

Any help would be appreciated.

Oli


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 03, 2004 2:56 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You mean 1 FK column mapping to different PK tables?

_________________
Emmanuel


Top
 Profile  
 
 Post subject: foreign keys
PostPosted: Fri Jun 04, 2004 4:50 am 
Newbie

Joined: Tue Sep 16, 2003 10:38 am
Posts: 3
One table has two foreign keys, each foreign key column maps to a different primary key table

example

table a
a_id
a_b_id
a_c_id

table b
b_id

table c
c_id

So how is that relationship in 'table a' mapped in hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 04, 2004 5:36 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you can have for example two many to one from a to b and c, but all depends on how you want to think your domain model...

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.