@@ -42,16 +42,19 @@ Key Handling Options
42
42
Specifies how the ``_id`` field is populated when new documents are
43
43
inserted into a collection. You can choose one of the following options:
44
44
45
- - :guilabel:`Wrapped Inherited Primary Key `
45
+ - :guilabel:`Autogenerated ObjectId `
46
46
47
- - Your ``_id`` field is populated with an object where the key is the
48
- name of your primary key field and the value is the value of your
49
- primary key field.
47
+ - Your ``_id`` field is populated with an autogenerated random
48
+ :ref:`ObjectId <document-bson-type-object-id>`.
50
49
51
- For example, if your relational table row has a primary key of
52
- ``personId = 1``, after migration your MongoDB ``_id``field is
53
- ``_id: { personId: 1 }``.
50
+ ``Autogenered ObjectId`` is the default key handling strategy used
51
+ when creating a new project.
54
52
53
+ You may choose to keep the original primary key as a different field
54
+ in the collection.
55
+
56
+ For example, if your relational table row has a primary key of ``personId = 1``,
57
+ after migration your MongoDB ``_id`` field is ``_id: ObjectId("62472f3d5849820a91d7b52f")``.
55
58
56
59
- :guilabel:`Single Inherited Primary Key`
57
60
@@ -61,17 +64,16 @@ inserted into a collection. You can choose one of the following options:
61
64
For example, if your relational table row has a primary key of ``personId=1``,
62
65
after migration your MongoDB ``_id`` field is ``_id: 1``.
63
66
67
+ - :guilabel:`Wrapped Inherited Primary Key`
64
68
65
- - :guilabel:`Autogenerated ObjectId`
66
-
67
- - Your ``_id`` field is populated with an autogenerated random
68
- `ObjectId <https://www.mongodb.com/docs/manual/reference/bson-types/#std-label-objectid>`__.
69
+ - Your ``_id`` field is populated with an object where the key is the
70
+ name of your primary key field and the value is the value of your
71
+ primary key field.
69
72
70
- You may choose to keep the original primary key as a different field
71
- in the collection.
73
+ For example, if your relational table row has a primary key of
74
+ ``personId = 1``, after migration your MongoDB ``_id``field is
75
+ ``_id: { personId: 1 }``.
72
76
73
- For example, if your relational table row has a primary key of ``personId = 1``,
74
- after migration your MongoDB ``_id`` field is ``_id: ObjectId("62472f3d5849820a91d7b52f")``.
75
77
76
78
Key Handling Behavior
77
79
`````````````````````
0 commit comments