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

GLE updatedExisting and upserted fields

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.0, mongodb-2.6
    • None
    • manual
    • None

    Description

      The documentation refers to updateExisting, but the field is actually updatedExisting.

      In MongoDB 2.4.x, upserted is only present in the GLE response if the update did not already include an _id field. In 2.5.x, it appears to always be included (if updatedExisting is false, that is), but it may not always be an ObjectId. It could very well be the existing _id that was in the update criteria for the upserted document.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 3 weeks, 1 day ago