-->
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: Mapping
PostPosted: Fri Feb 12, 2010 1:39 pm 
Newbie

Joined: Thu Oct 01, 2009 5:38 pm
Posts: 6
What is the difference between one to one and many to one mapping with nhibernate..


Top
 Profile  
 
 Post subject: Re: Mapping
PostPosted: Sat Feb 13, 2010 7:31 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
one-to-one: objects on both ends exist (normally linked through the primary key)
many-to-one: 0..n objects to one object ("foreign key")

If you need to model something like 0,1 to 1 than you need a many-to-one.

_________________
--Wolfgang


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.