And with zero clauses renders as { $and : [] }

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Critical - P2
    • None
    • Affects Version/s: 2.4.3
    • Component/s: Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Related to CSHARP-1912.
      The following code:

      var filt1 = Builders<Thing>.Filter.Empty;
      var filt2 = Builders<Thing>.Filter.Empty;
      var filter = Builders<Thing>.Filter.And(filt1,filt2);
      

      Results in the following filter being rendered:

      { "$and" : [] }

      Instead of an empty filter.
      This was introduced in version 2.4.2,

              Assignee:
              Robert Stam
              Reporter:
              Juan Santander
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: