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

GLE updatedExisting and upserted fields

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • v1.3.0, mongodb-2.6
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      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.

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

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