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

Using array in Expression Filter throws an exception

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.3
    • Affects Version/s: 2.4.2
    • Component/s: Serialization
    • Labels:
    • Environment:
      Local environment (Developer Machine)

      I am currently trying to update our MongoDB references to the latest (2.4.2) to allow our DBA team to upgrade our environments to the latest Mongo 3.4.

      Updating the references using Nugget packages has shown a breaking changes affecting our production code and stopping us from a smooth upgrade.

      the issue: when using a nullable type array in the Expression (Func) filter - the mongoC# Driver throws an exception:

      {"Unable to cast object of type 'MongoDB.Bson.Serialization.Serializers.ArraySerializer`1[System.Nullable`1[System.Guid]]' to type 'MongoDB.Bson.Serialization.IBsonSerializer`1[System.Guid]'."}

      I have added a small app on my github that replicate the issue if that can be of any help.

      I am not sure if this was the right channel to log the issue and I want to apoloy if this was not the case.

      The github address for the relevant repository: https://github.com/Sifou13/MongoNullableArrayFilterIssue

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            Sifou Sif-eydine Ounas [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: