Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-894

Reasons for document validation failure is not reported for insertMany()

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • 2
    • Not Needed

      Problem Statement/Rationale

      When insertMany() fails due to document validation rules, it should print out the failed rules in the same way insertOne() or updateMany() do.

      Steps to Reproduce

      • connect to a 5.0 server
      • db.createCollection('with_validation', {validator: {$jsonSchema: {required: ['foo']}}}

      Expected Results

      db.with_validation.insertMany([\{bar: 1}]) prints out the reasons for failing validation

      Actual Results

      db.with_validation.insertMany([\{bar: 1}]) does not print out the reasons for failing validation

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            Unassigned Unassigned
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: