@@ -30,28 +30,22 @@ The following sections focus on ``insertOne()`` and
3030method, see our
3131:doc:`guide on Bulk Operations </crud/write-operations/bulk/>`.
3232
33- A Note About ``_id``
34- --------------------
33+ .. note:: The ``id_`` field in Insert Operations
3534
36- When inserting a document, MongoDB enforces one constraint on your
37- documents by default: each document *must* contain a unique ``_id``
38- field.
35+ When inserting a document, MongoDB enforces one constraint on your
36+ documents by default: each document *must* contain a unique ``_id``
37+ field. Duplicate ``_id`` values violate unique index constraints, resulting in a ``WriteError``.
3938
40- There are two ways to manage this field:
39+ There are two ways to manage this field:
4140
42- - You can manage this field yourself, ensuring each value you use is unique.
43- - You can let the driver automatically generate unique ObjectId values.
41+ - You can manage this field yourself, ensuring each value you use is unique.
42+ - You can let the driver automatically generate unique ObjectId values.
4443
45- Unless you have provided strong guarantees for uniqueness, we recommend
46- you let the driver automatically generate ``_id`` values.
47-
48- .. note::
49-
50- Duplicate ``_id`` values violate unique index constraints, resulting
51- in a ``WriteError``.
52-
53- For additional information on unique indexes, see the manual entry on
54- :manual:`Unique Indexes </core/index-unique/>`.
44+ Unless you have provided strong guarantees for uniqueness, we recommend
45+ you let the driver automatically generate ``_id`` values.
46+
47+ For additional information on unique indexes, see the manual entry on
48+ :manual:`Unique Indexes </core/index-unique/>`.
5549
5650Insert a Single Document
5751------------------------
0 commit comments