-->
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.  [ 3 posts ] 
Author Message
 Post subject: One to Many Relationship
PostPosted: Wed Oct 24, 2007 8:06 am 
Newbie

Joined: Tue Oct 23, 2007 4:00 am
Posts: 9
Hi All,
Is there any need of primary key and foreign key relationship between parent and child table for the JoinColumn, if i want to make a one to many relationship between them. Please Clarify me on this.

Bb


Top
 Profile  
 
 Post subject: Re: One to Many Relationship
PostPosted: Wed Oct 24, 2007 12:24 pm 
Newbie

Joined: Tue Sep 04, 2007 2:53 am
Posts: 7
No, there need not be any fk's declared in your Datamodel explicitly. To make hibernate join on such column use the @JoinColumn annotation and explicitly set the referencedColumnName to point to the column on which you need to have the join.

Please rate if this post helped.


Top
 Profile  
 
 Post subject: Re: One to Many Relationship
PostPosted: Wed Oct 24, 2007 12:28 pm 
Newbie

Joined: Tue Sep 04, 2007 2:53 am
Posts: 7
No, there need not be any fk's declared in your Datamodel explicitly. To make hibernate join on such column use the @JoinColumn annotation and explicitly set the referencedColumnName to point to the column on which you need to have the join.

Please rate if this post helped.


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