I have a simple class with the following structure (recursive)
public class Folder
{
public Folder Parent { get; set; }
public List<Folder> Child { get; set; }
public string Name { get; set; }
}
I am trying to write a query in HQL to do a recursive search.
What I need to do is to fetch all the Folder where "somewhere in the
tree" there is a folder with a name like "ABC"
The HQL is the following:
from Session.Query<Folder>() f
left join f.Child c
where
f.Name like :nameparam or c.Name like :nameparam
The function it is not recursive because it doesn't build the tree as
expected, I mean it does not filter the children ...
Is there a "formal" way of building and filtering recursively a tree
graph using HQL, QueryOver<T> or Linq?
Thanks
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.