Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1491

Create Array update code samples for MongoDB 3.6 page

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Documentation
    • None

    Description

      Please provide C# code for the following Java example :

      Array Updates

      // 3. Exploiting the power of arrays
      MongoCollection<Document> collection = client
        .getDatabase("test")
        .getCollection("arrayUpdatesTest");
       
      collection.updateOne(
        Filters.eq("_id", 1),
        Updates.set("a.$[i].b", 2),
       
      new UpdateOptions()
        .arrayFilters(
          Collections.singletonList(
            Filters.eq("i.b", 0))));
      


      DRIVERS Ticket Description
      Script Target - If you can read this text, the script has failed

      Attachments

        Issue Links

          Activity

            People

              rachelle.palmer@mongodb.com Rachelle Palmer
              rathi.gnanasekaran Rathi Gnanasekaran
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: