-->
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: Why many-to-one when it is not "many"-to-one
PostPosted: Tue Jan 03, 2006 1:33 pm 
Beginner
Beginner

Joined: Fri Dec 23, 2005 6:05 am
Posts: 42
Hello,

I am still new to NH and I tried to create a Class (Event) that contains a location (Address).
The first thing I tried was the component-way and that worked great. Then I read (HIA) that you can also use a many-to-one relation to create such simple relations. Although it sounds a bit silly to me, because it's not realy a many-to-one relation. There is one event, and it has one address.
So why is it called a many-to-one then, and what is a best approach.

eg


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 03, 2006 2:04 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Because the address can potentially be shared by several events, so many events can have one address. The fact that in your concrete case it isn't so is irrelevant.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 11:15 am 
Beginner
Beginner

Joined: Fri Dec 23, 2005 6:05 am
Posts: 42
I see. Thanks


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.