Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1189

FilterDefinitionBuilder doesn't account for all the variants of Eq, Gte, In, etc... where arrays or scalars are allowed

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.0
    • None
    • None
    • None

    Description

      For instance, the new FilterDefinitionBuilder expression tree support doesn't account for performing an "equality" test for a single item against an array.

      class Person
      {
        public string[] Colors;
      }
       
      Builders<Person.Filter.Eq(x => x.Colors, "red"); // compile error

      Attachments

        Activity

          People

            Unassigned Unassigned
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: