File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
NHibernate.Test/Linq/ByMethod
NHibernate/Linq/ReWriters Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -810,6 +810,19 @@ public void GroupByOrderByKeySelectToClass()
810
810
}
811
811
812
812
813
+ [ Test ( Description = "NH-3743" ) ]
814
+ public void FetchBeforeGroupBy ( )
815
+ {
816
+ var result = db . Orders
817
+ . Fetch ( x => x . Customer )
818
+ . GroupBy ( x => x . Customer . CompanyName )
819
+ . OrderBy ( x => x . Key )
820
+ . Select ( x => new { P0 = x . Key , P1 = x . Count ( ) } )
821
+ . ToArray ( ) ;
822
+
823
+ Assert . True ( result . Any ( ) ) ;
824
+ }
825
+
813
826
private class GroupInfo
814
827
{
815
828
public object Key { get ; set ; }
Original file line number Diff line number Diff line change 4
4
using Remotion . Linq ;
5
5
using Remotion . Linq . Clauses ;
6
6
using Remotion . Linq . Clauses . Expressions ;
7
+ using Remotion . Linq . EagerFetching ;
7
8
using Remotion . Linq . Parsing ;
8
9
9
10
namespace NHibernate . Linq . ReWriters
@@ -16,6 +17,8 @@ public class QueryReferenceExpressionFlattener : ExpressionTreeVisitor
16
17
{
17
18
typeof ( CacheableResultOperator ) ,
18
19
typeof ( TimeoutResultOperator ) ,
20
+ typeof ( FetchOneRequest ) ,
21
+ typeof ( FetchManyRequest )
19
22
} ;
20
23
21
24
private QueryReferenceExpressionFlattener ( QueryModel model )
You can’t perform that action at this time.
0 commit comments