-->
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: FK constraint
PostPosted: Wed Jun 30, 2004 2:40 am 
Beginner
Beginner

Joined: Sun Feb 08, 2004 4:09 pm
Posts: 46
Hi,


Consider this situation:

Class A 1..* Class B
Class C 1..* Class B

When I define this in hibernate.cfg.xml, will I have to define a foreign key for each class in table for class B (id_a, id_c) or can I define a general fk that in some instances of B would refer to A and other instances would refer to C?

Thanks in advance,
Thiago Souza


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 5:56 am 
Beginner
Beginner

Joined: Sun Feb 08, 2004 4:09 pm
Posts: 46
Sorry, not in hibernate.cfg.xml, in *.hbm.xml =)


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.