@@ -49,24 +49,19 @@ This guide includes the following sections:
4949The _id Field
5050-------------
5151
52- In MongoDB, each document *must* contain a unique ``_id`` field.
53- MongoDB allows you to manage this field in the following ways:
54-
55- - Manage this field yourself, ensuring that each ``_id`` value you set
56- is unique.
57- - Let the driver automatically generate unique ``ObjectId`` values. The
58- driver generates a unique ``ObjectId`` value for each document if you do
59- not specify a value for the ``_id`` field when performing an insert.
52+ In a MongoDB collection, each document *must* contain a unique ``_id``
53+ field value. The driver automatically generates a unique value for each
54+ document as an ``ObjectId`` type when you insert data into a
55+ collection.
6056
61- Unless you provide strong guarantees for uniqueness, we recommend that
62- you let the driver automatically generate ``_id`` values for your
63- documents.
57+ If you prefer to set custom values, you can assign the values in
58+ the ``_id`` fields of documents passed to your insert operation.
6459
6560.. important:: Duplicate _id Values
6661
67- If you attempt to perform a write operation that includes duplicate ``_id``
68- values, the duplicate values violate unique index constraints and cause
69- the write operation to fail.
62+ If you attempt to insert documents that
63+ include duplicate ``_id`` values, these values violate unique
64+ index constraints and cause the write operation to fail.
7065
7166To learn more about the ``_id`` field, see :manual:`Unique Indexes
7267</core/index-unique/>` in the Server manual.
0 commit comments