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

Comment on: "manual/reference/method/db.collection.findOneAndReplace.txt"

    XMLWordPrintableJSON

Details

    Description

      Wrong output:

      db.scores.findOneAndReplace(
      { "score" :

      { $lt : 22250 }

      },

      { "team" : "Therapeutic Hamsters", "score" : 22250 }

      ,
      { sort :

      { "score" : 1 }

      , project:

      { "_id" : 0, "team" : 1 }

      }
      )

      will return

      { "team" : "Cuddly Zebras" }

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 13 weeks, 2 days ago