We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 084742f commit 20b6f92Copy full SHA for 20b6f92
source/write/bulk-write.txt
@@ -67,6 +67,12 @@ The following example creates an instance of ``InsertOne``:
67
68
To insert multiple documents, create an instance of ``InsertOne`` for each document.
69
70
+.. note::
71
+
72
+ Duplicate ``_id`` values violate unique index constraints, which causes the
73
+ driver to return a ``DuplicateKeyError``. To avoid this error, ensure that
74
+ each document you insert has a unique ``_id`` value.
75
76
Update Operations
77
~~~~~~~~~~~~~~~~~
78
0 commit comments