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 10
10
11
11
using System ;
12
12
using System . Collections ;
13
+ using System . Linq ;
13
14
using NHibernate . Dialect ;
14
15
using NUnit . Framework ;
16
+ using NHibernate . Linq ;
15
17
16
18
namespace NHibernate . Test . CompositeId
17
19
{
@@ -296,5 +298,15 @@ public async Task QueryAsync()
296
298
await ( t . CommitAsync ( ) ) ;
297
299
s . Close ( ) ;
298
300
}
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
+ }
299
311
}
300
312
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections ;
3
+ using System . Linq ;
3
4
using NHibernate . Dialect ;
4
5
using NUnit . Framework ;
5
6
@@ -285,5 +286,15 @@ public void Query()
285
286
t . Commit ( ) ;
286
287
s . Close ( ) ;
287
288
}
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
+ }
288
299
}
289
300
}
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ public IList<IParameterSpecification> Parameters
182
182
void BeforeStatement ( string statementName , int statementType )
183
183
{
184
184
_inFunctionCall = false ;
185
+ _inCase = false ;
185
186
_level ++ ;
186
187
if ( _level == 1 )
187
188
{
You can’t perform that action at this time.
0 commit comments