Query Lambdas: "!externalList.Contains(prop)" supported, but "externalList.Contains(prop) == false" fails

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.14.0
    • Affects Version/s: 2.4.3
    • Component/s: LINQ, LINQ3
    • None
    • None
    • None
    • None
    • None
    • None

      Hey chaps
      I logged a VERY similar issue some time back (which has been resolved: CSHARP-1543 )
      This is specific to using the .Contains() linq extension on (in my case) a generic List, checking if it contains a property of the queried document.
      Pseudo example:

      var myList = new List<string>() { "bob", "frank" };
      var results = queryable.Where(doc => myList.Contains(doc.prop) == false).ToList(); //this fails
      var results2 = queryable.Where(doc => !myList.Contains(doc.prop)).ToList(); //this works
      

              Assignee:
              Unassigned
              Reporter:
              Kevin Versfeld
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: