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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      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

            Assignee:
            Unassigned
            Reporter:
            craiggwilson Craig Wilson
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: