Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1340

Update#save docs should show the corresponding update being done.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    Description

      http://docs.mongodb.org/manual/applications/update/#save

      If there is an _id value, then it should show the update statement used (including the upsert flag). A logical code block like this is probably the easiest way for most to understand when skimming.

      function save(doc){
        if(doc["_id"])
          update({_id:doc["_id"]}, doc, {upsert:true});
        else
          insert(doc);
      }

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 45 weeks, 5 days ago