Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7348

Warn if _id is an object with mutiple keys

    XMLWordPrintableJSON

Details

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

    Description

      It is usually a very bad idea. Among other reasons, in many languages, db.foo.save(db.foo.findOne()) might insert a new object rather than updating the existing one.

      We will need some way to disable the warnings for the few cases where it is necessary, such as map-reduce output.

      Maybe this is best handled by warning in the driver rather than the server.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: