-->
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.  [ 1 post ] 
Author Message
 Post subject: Tree with Hibernate
PostPosted: Wed Oct 01, 2008 10:51 am 
Newbie

Joined: Wed Oct 01, 2008 3:38 am
Posts: 1
Hello,

I'm new to Hibernate (and also java...). In my current project, I would like to store in my database a tree.

The class containing data, called Node, may have a parent and many children. The order of the children is not important.

My question is, is it possible to store such structure with Hibernate. I guess the answer is yes, so what is the best way to do it ?

Can I do a one-to-many mapping for the childs and a many-to-one for the parent, for the same class ?

Thanks for your help (and sorry for my english).
Olivier Heriveaux


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.