-->
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: Load a tree
PostPosted: Sun Jan 02, 2005 1:53 pm 
Newbie

Joined: Mon Dec 22, 2003 10:00 am
Posts: 11
Location: Switzerland
Hi, I have a parent-child structure, and I would like to load a list of all the children, sorted by the path structure, using a one-shot HQL query.
Is it possible? ... I can't figure it out

E.g. the list should return
/a
/a/b
/aa
/aa/c
/aa/d
...

Thank you
Massimo


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 02, 2005 8:39 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Not possible, use one of the things I've listed in this blog entry:

http://blog.hibernate.org/cgi-bin/blosx ... gettricked


Top
 Profile  
 
 Post subject: DB Independence...
PostPosted: Wed Jan 05, 2005 10:05 am 
Newbie

Joined: Mon Aug 09, 2004 2:50 pm
Posts: 10
Location: Sao Paulo , SP, Brazil
Hi,

Í have seen the blog... The problem is that the solution shown is not database independence (It isn´t using Hibernate). Does anyone know a solution for this problem using Hibernate ?

Thanks in advance,

Sergio Stateri Jr.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 05, 2005 10:14 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, Hibernate doesn't have any additional support for hierarchical queries (well, batch selects for lazy collections helps a lot). You can easily externalize your proprietary query in a mapping file and keep it documented.


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.