File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
src/NHibernate.Test/NHSpecificTest/NH3408 Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
1
2
using System . Linq ;
2
3
using NHibernate . Linq ;
3
4
using NUnit . Framework ;
@@ -18,5 +19,35 @@ public void ProjectAnonymousTypeWithArrayProperty()
18
19
Assert . DoesNotThrow ( ( ) => { query . ToList ( ) ; } ) ;
19
20
}
20
21
}
22
+
23
+ [ Test ]
24
+ public void ProjectAnonymousTypeWithArrayPropertyWhenByteArrayContains ( )
25
+ {
26
+ using ( var session = OpenSession ( ) )
27
+ using ( session . BeginTransaction ( ) )
28
+ {
29
+ var pictures = new List < byte [ ] > ( ) ;
30
+ var query = from c in session . Query < Country > ( )
31
+ where pictures . Contains ( c . Picture )
32
+ select new { c . Picture , c . NationalHolidays } ;
33
+
34
+ Assert . DoesNotThrow ( ( ) => { query . ToList ( ) ; } ) ;
35
+ }
36
+ }
37
+
38
+ [ Test ]
39
+ public void SelectBytePropertyWithArrayPropertyWhenByteArrayContains ( )
40
+ {
41
+ using ( var session = OpenSession ( ) )
42
+ using ( session . BeginTransaction ( ) )
43
+ {
44
+ var pictures = new List < byte [ ] > ( ) ;
45
+ var query = from c in session . Query < Country > ( )
46
+ where pictures . Contains ( c . Picture )
47
+ select c . Picture ;
48
+
49
+ Assert . DoesNotThrow ( ( ) => { query . ToList ( ) ; } ) ;
50
+ }
51
+ }
21
52
}
22
53
}
You can’t perform that action at this time.
0 commit comments