This is what I am going to use:

 Parent parentAlias = null;

Child childAlias = null;

 

var r = session.QueryOver<Child>(() => childAlias)

    .JoinQueryOver(c => c.Parent, () => parentAlias)

    .OrderBy(() => parentAlias.Name).Asc

    .ThenBy(() => childAlias.Name).Asc

    .List();


SQL:

    SELECT

        this_.ChildId as ChildId0_1_,

        this_.ParentId as ParentId0_1_,

        this_.Name as Name0_1_,

        this_.Value as Value0_1_,

        parentalia1_.ParentId as ParentId1_0_,

        parentalia1_.Name as Name1_0_,

        parentalia1_.Value as Value1_0_ 

    FROM

        Child this_ 

    inner join

        Parent parentalia1_ 

            on this_.ParentId=parentalia1_.ParentId 

    ORDER BY

        parentalia1_.Name asc,

        this_.Name asc


Is there a simpler way to get the same result?

 

-- 
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.

Reply via email to