Yes, it's simpler. But I think the code with QueryOver queries is easier to refactor than the code with HQL queries. I have not tried ReSharper though.
2010/12/22 Gustavo Ringel <[email protected]> > select child > from Child child join child.Parent parent > order by parent.Name, child.Name > > this is simpler IMHO... > > On Wed, Dec 22, 2010 at 8:37 PM, vk37 <[email protected]> wrote: > >> 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]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- С уважением, Владимир Харитонов [email protected] тел. +7 (910) 990-23-00 -- 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.
