-->
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.  [ 4 posts ] 
Author Message
 Post subject: Ordering the children set in a parent/child relationship?
PostPosted: Wed Aug 24, 2005 1:42 pm 
Newbie

Joined: Wed Aug 24, 2005 1:30 pm
Posts: 2
Hi, i'm pretty new to hibernate, so i'm sorry if i break any rules by posting this question.

I have implemented the a tree structure that is mapped from the database using the parent/child relationship, and it works great except the children set seems to populate in any given order and not always the same. Is there a way to apply order to the mapping of the children to the parents?

thanks
-daniel


Top
 Profile  
 
 Post subject: order by
PostPosted: Wed Aug 24, 2005 1:47 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
Perhaps you need to specify order-by="column_name asc|desc"
http://www.hibernate.org/hib_docs/v3/re ... ns-mapping

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 24, 2005 2:21 pm 
Newbie

Joined: Wed Aug 24, 2005 1:30 pm
Posts: 2
you rule! that worked. thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 11:17 am 
Newbie

Joined: Fri Sep 02, 2005 12:47 pm
Posts: 14
Location: muenchen
Hi,

I found that you were trying to map tree like structure by hibernation could you please have a look at my question?

http://forum.hibernate.org/viewtopic.php?t=947235

shortly speaking it seems that mapping have a problem with highest node not having parent_id.

Do you have any solution for this.

Sincerely,

Pawel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.