-->
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: What is a one-to-many declaration useful for?
PostPosted: Wed Feb 18, 2004 11:39 am 
Newbie

Joined: Mon Feb 16, 2004 7:11 am
Posts: 13
Hey everybody!

I'm just configuring a new table in Hibernate and are wondering what a <one-to-many> declaration might be useful for. Is it just for saving the E/R in the XML-files, or does it also give you an advantage, like if I declarate a <one-to-many> on an Order-class, which therefore references a Customer-class that I can ask something like

Code:
Collection Customer.getOrders()


Cause til now I always left those <one-to-many> things out, cause I found it not useful.

Thanks for any help!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 18, 2004 11:42 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Entity associations is basically what Hibernate is all about. Check some of the Tutorials linked on the website (External Documentation) and read the "Parent/Child Relationship" chapter in the reference.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.