-->
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: Class
PostPosted: Mon Aug 30, 2004 5:21 pm 
Newbie

Joined: Mon Aug 30, 2004 5:15 pm
Posts: 13
Hibernate version: 2.1.6

Name and version of the database you are using: MS Sql Server 2000


I am trying to make a listing of categories and subcategories, and would like some input on the best way to do this. I would like to make one Category class, and in the class have a reference to a parent and to any children.

ex.

Code:
class Category {
    private Category parent;
    private Category[] children;
}


My question is how do I map this and store it in a database?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2004 9:40 pm 
Regular
Regular

Joined: Tue Dec 09, 2003 2:39 pm
Posts: 106
Location: Toronto, Canada
Hi majohnst,

Take time to read the Hibernate documentation on the web site, it is very good and I think by reading the initial chapters you'll find your answer there, as I did when I began using Hibernate.

We've also invested in the Hibernate In Action book which provides a wealth of knowledge.

Good luck,
Roll


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.