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

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

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

      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@mongodb.com Robert Stam
            Reporter:
            juan.santander@comfortmedical.com Juan Santander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: