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

provide warning when _id is not in list of properties and additionalProperties is false

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc1
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • QO 2021-11-01

      Since user cannot insert a document without "_id" value, it's not very user friendly to start failing every single document when they add additionalProperties:false without enumerating _id field explicitly properties (or having it covered in patternProperties).

      It would be useful to log a warning when this scenario is detected.

            Assignee:
            ted.tuckman@mongodb.com Ted Tuckman
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: