Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1840

Document the equivalent of the save method in MongoCollection

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.0.1
    • Documentation
    • None

    Description

      This is the idiom:

         collection.replaceOne(Filters.eq("_id", doc.get("_id")), doc, new UpdateOptions().upsert(true));
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: