This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Object Relational Mapping and the fly likes Hibernate one-to-many association Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate one-to-many association" Watch "Hibernate one-to-many association" New topic
Author

Hibernate one-to-many association

Lars Vonk
Ranch Hand

Joined: Aug 05, 2005
Posts: 30
Hello,

The Hibernate reference Documentation 3.0.5 states in paragraph 8.2.3 that:

A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended.

Does anyone know why this is considered an unusual case (I have seen it many times) and not recommended?
Regards,
Lars
[ August 21, 2005: Message edited by: Lars Vonk ]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

A unidirectional one-to-many association can only exist if the "many" is a stand alone entity, and that is fairly unusual (in my experience anyway). Since most one-to-many relationships tend to define parent-child relationships they would normally be bidirectional.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Lars Vonk
Ranch Hand

Joined: Aug 05, 2005
Posts: 30
Thanks for replying Paul. I agree with you that most of the one-to-many association can be described as parent-child, although I cannot say I find the 'stand-alone' version an unasual scenario. Thanks again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate one-to-many association