Skip to content

Commit 14b3b3f

Browse files
committed
JT tech review 1
1 parent bd7f587 commit 14b3b3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/eloquent-models/model-class.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,10 @@ MongoDB.
297297
When you apply the ``DocumentModel`` trait to a model class, you must
298298
declare the following properties in your class:
299299

300-
- ``$primaryKey``: Defines the field that uniquely identifies a MongoDB document
301-
- ``$keyType``: Defines the type of the primary key value
300+
- ``$primaryKey = '_id'``, because the ``_id`` field uniquely
301+
identifies MongoDB documents
302+
- ``$keyType = 'string'``, because {+odm-short+} casts MongoDB
303+
``ObjectId`` values to type ``string``
302304

303305
Extended Class Example
304306
~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)