I have following entities:
public class Parent
{
public virtual Int32 Id {get; set;}
public virutal IList<Child> Children {get; set;}
}
public class Child
{
public virtual Int32 Id {get; set;}
public virtual Parent Parent {get; set;}
public virtual IList<GrandChild> GrandChildren {get; set;}
}
public class GrandChild
{
public virtual Int32 Id {get; set;}
public virtual Child Child {get; set;}
}
When using ICriteria, I can fetch the GrandChild by using SetFetchMode()
like:
session.CreateCriteria<Parent>()
.SetFetchMode("Children", FetchMode.Eager)
.SetFetchMode("Children.GrandChildren", FetchMode.Eager)
.List<Parent>();
Now I want to convert the above code to using QueryOver API, but I cannot
find the way to fetch the grandchildren except using the complex join
methods (e.g. JoinAlias() or JoinQueryOver()).
Is there any way that can fetch the grandchildren easily ?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.