-->
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: Bidirectinal Associations
PostPosted: Mon Feb 21, 2005 5:09 pm 
Newbie

Joined: Mon Feb 21, 2005 2:15 pm
Posts: 9
Hi,

I am new to Hibernate and I am reading the Hibernate in Action book.
I am unable to understand Associations.
We make an association bidirectional by setting inverse=true in the mapping file.
The book example says there is a bidirectional relationship between Item and Bid.
But in the table relationship diagram there is a primary key BID_ID in the BID table and a foreign key ITEM_ID which shows the association between Bid and item.
The other association (ie the other way round ) between Item and BId, there is no foreign key in ITEM table.
So just saying inverse=true, would that make it a bidirectional association .
Isn't there a need a foreign key in the ITem table ?

If anyone could please explain me this.

Thanks,
Gayatri


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 21, 2005 6:17 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, thats one of the differences between the two models, discussed in chapter 1. If you don't understand the explanations in the book you might want to try some of the tutorials linked on www.hibernate.org.


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.