-->
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: How to fetch a tree of objects with restrictions.
PostPosted: Mon Sep 25, 2006 12:44 pm 
Newbie

Joined: Mon Sep 18, 2006 5:21 am
Posts: 6
Hi,

I have the tree of objects of the following class:

class Node {
Node parent;
String color;
}

Parent property is not lazy initialized, so when I get a root object (parent == null) I am getting tree of objects. I am using the following query:

Code:
from Node where parent is null


Now I would like to get the root but with the restriction that color of each node (no matter how deep in hierarchy) is not equal to "blue". How to do that?

regards
John

_________________
John


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 6:55 am 
Newbie

Joined: Mon Sep 18, 2006 5:21 am
Posts: 6
Is is at all possible?

_________________
John


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 10:53 am 
Newbie

Joined: Tue Sep 26, 2006 10:51 am
Posts: 6
Location: Berlin, Germany
Hi,

try to use filters - I think it solves your problem.

Greetings,
Albert

_________________
Albert Gorski agorski(at/)gmx(dot/)net


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 4:47 am 
Newbie

Joined: Mon Sep 18, 2006 5:21 am
Posts: 6
Perfect - thats what I exactly needed! Thanks a lot!

Best regards
John

_________________
John


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.