-->
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: differences between <one-to-may> and <many-to-one&g
PostPosted: Wed Jan 16, 2008 9:52 pm 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
hi,

i got confuse between <one-to-may> and <many-to-one>.

Can some one provide some example for this 2 association mapping ?

when read though the hibernate reference, it say that <one-to-may> is not receommended. ( section 7.2.3)

I just wondering that normaly, we say "one person got many address" (shipping address, billing address) instead of "many person got one address" right ?

any one got any idea ? or am I just interpret it wrongly ?

_________________
happy hacking !


Top
 Profile  
 
 Post subject: Re: differences between <one-to-may> and <many-to-o
PostPosted: Thu Jan 17, 2008 1:14 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
kiwionly wrote:
the hibernate reference, it say that <one-to-may> is not receommended. ( section 7.2.3)


Naha, the document says a unidirectional one-to-many association on a foreign key is discouraged.

Quote:
We think it's better to use a join table for this kind of association.



The association type is fine. It is just a discussion of how you design it in db.


Farzad-


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 18, 2008 2:43 am 
Beginner
Beginner

Joined: Mon Dec 17, 2007 11:08 pm
Posts: 47
ok, get it, thx !

_________________
happy hacking !


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.