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

Change of BsonNull.Value in c# driver from Version 2.2 to 2.4.3

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 2.4.3
    • Component/s: BSON
    • Labels:
    • Minor Change

      I am using BsonValue.Null for querying in filter
      I am creating my filter like this:
      Builders<T>.Filter.Eq("TransactionKey", BsonNull.Value) | Builders<T>.Filter.Eq("TransactionKey", string.Empty)

      In Version 2.2 this query is rendered as
      { "$or" : [

      { "TransactionKey" : null }

      ,

      { "TransactionKey" : "" }

      ] }

      but in Version 2.4.3 this query is rendered as
      { "$or" : [

      { "TransactionKey" : "BsonNull" }

      ,

      { "TransactionKey" : "" }

      ] }

      So is the value of BsonValue.Null is changed from null to "BsonNull" purposely or is it a defect?

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            kumardheeraj4099@gmail.com Dheeraj kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: