I'm thinking this may be related to the changes made to support DbInExpression (see : http://forums.devart.com/viewtopic.php?f=1&t=32061 )
Since we've updated dotConnect to 8.4.457, we are having a weird bug.
OR on Contains are throwing a NullReferenceExceptions but they work fine if i isolate the Contains and repeat the conditions outside the OR.
For example, this will throw on the bool exists line:
Code: Select all
string x = "somestring";
List<String> list1 = new List<string> { "string1", "string2" };
List<String> list2 = new List<string> { "string3", "string4" };
bool exists = (from o in myObjectContext.MYTABLEs where o.X == x && (list1.Contains(o.Y) || list2.Contains(o.Z)).Any();
Code: Select all
string x = "somestring";
List<String> list1 = new List<string> { "string1", "string2" };
List<String> list2 = new List<string> { "string3", "string4" };
bool exists = (from o in myObjectContext.MYTABLEs where (o.X == x && list1.Contains(o.Y)) || (o.X == x && list2.Contains(o.Z)).Any();
So : x && (y || z), where y and z are list.Contains is broken.
Thanks