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

XMLWordPrintableJSON

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

      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 Stam
              Reporter:
              Dheeraj kumar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: