Skip to content

Commit 5a36a49

Browse files
committed
JT feedback
1 parent aeaf760 commit 5a36a49

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

docs/eloquent-models/model-class.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,8 @@ including this trait, you can make the third-party class compatible with
295295
MongoDB.
296296

297297
When you apply the ``DocumentModel`` trait to a model class, you must
298-
declare the following properties in your class:
299-
300-
- ``$primaryKey = '_id'``, because the ``_id`` field uniquely
301-
identifies MongoDB documents
302-
- ``$keyType = 'string'``, because the {+odm-short+} casts MongoDB
303-
``ObjectId`` values to type ``string``
298+
set the ``$keyType`` property to ``'string'`` as the {+odm-short+}
299+
casts MongoDB ``ObjectId`` values to type ``string``.
304300

305301
Extended Class Example
306302
~~~~~~~~~~~~~~~~~~~~~~

docs/query-builder.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ the value of the ``title`` field is ``"Back to the Future"``:
188188

189189
.. note::
190190

191-
Starting in v5.0, you can use the ``id`` alias in your queries to represent
192-
the ``_id`` field in MongoDB documents, as shown in the preceding
191+
You can use the ``id`` alias in your queries to represent the
192+
``_id`` field in MongoDB documents, as shown in the preceding
193193
code. When you run a find operation using the query builder, {+odm-short+}
194194
automatically converts between ``id`` and ``_id``. Because of this behavior,
195195
you cannot have two separate ``id`` and ``_id`` fields in your documents.

0 commit comments

Comments
 (0)