-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.2.17, 3.4.9, 3.5.13
-
Component/s: Shell
-
Labels:None
-
Query
-
ALL
-
Frustratingly, the db.collection.insert() shell helper silently ignores the "bypassDocumentValidation" flag. Fixing this problem is Harder Than It Sounds because the function uses the shell's Bulk API, which apparently does not have any notion of passing in options when performing an insert.
I manually inspected the shell code back to v3.2 and I believe the issue has been present since when document validation was introduced.
As a workaround, you can use db.runCommand to run the insert command directly and specify the option yourself.
- duplicates
-
SERVER-21671 Allow specifying bypassDocumentValidation via the insert shell helper
- Closed