File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1010
1111using System ;
1212using System . Collections ;
13+ using System . Linq ;
1314using NHibernate . Dialect ;
1415using NUnit . Framework ;
16+ using NHibernate . Linq ;
1517
1618namespace NHibernate . Test . CompositeId
1719{
@@ -296,5 +298,15 @@ public async Task QueryAsync()
296298 await ( t . CommitAsync ( ) ) ;
297299 s . Close ( ) ;
298300 }
301+
302+ [ Test ( Description = "GH-2646" ) ]
303+ public async Task AnyOnCompositeIdAsync ( )
304+ {
305+ using ( var s = OpenSession ( ) )
306+ {
307+ await ( s . Query < Order > ( ) . Where ( o => o . LineItems . Any ( ) ) . ToListAsync ( ) ) ;
308+ await ( s . Query < Order > ( ) . Select ( o => o . LineItems . Any ( ) ) . ToListAsync ( ) ) ;
309+ }
310+ }
299311 }
300312}
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections ;
3+ using System . Linq ;
34using NHibernate . Dialect ;
45using NUnit . Framework ;
56
@@ -285,5 +286,15 @@ public void Query()
285286 t . Commit ( ) ;
286287 s . Close ( ) ;
287288 }
289+
290+ [ Test ( Description = "GH-2646" ) ]
291+ public void AnyOnCompositeId ( )
292+ {
293+ using ( var s = OpenSession ( ) )
294+ {
295+ s . Query < Order > ( ) . Where ( o => o . LineItems . Any ( ) ) . ToList ( ) ;
296+ s . Query < Order > ( ) . Select ( o => o . LineItems . Any ( ) ) . ToList ( ) ;
297+ }
298+ }
288299 }
289300}
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ public IList<IParameterSpecification> Parameters
182182 void BeforeStatement ( string statementName , int statementType )
183183 {
184184 _inFunctionCall = false ;
185+ _inCase = false ;
185186 _level ++ ;
186187 if ( _level == 1 )
187188 {
You can’t perform that action at this time.
0 commit comments