views:

16

answers:

0

Hi, I need help fetching tree hierarchy from db using nhibernate 3.0

 QueryOver.Of<Enterprise>(() => entAlias)
     .JoinAlias(() => entAlias.ChildEntities, () => childEntityAllias, JoinType.LeftOuterJoin)
     .TransformUsing(new DistinctRootEntityResultTransformer())

I am getting only the two level of the graph (parent and its childrens) but not the childrens of children etc.

The same is if I try to fetch parents of the leaf. I get only the parent of the leaf, but not parent of the parent of the parent... of the leaf. where level = n.

Ho to do this type of query. no mather if Icriteria, linq, HQL or else.