We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b95358 commit eabde02Copy full SHA for eabde02
docs/eloquent-models/model-class.txt
@@ -297,8 +297,10 @@ MongoDB.
297
When you apply the ``DocumentModel`` trait to a model class, you must
298
declare the following properties in your class:
299
300
-- ``$primaryKey``: Defines the field that uniquely identifies a MongoDB document
301
-- ``$keyType``: Defines the type of the primary key value
+- ``$primaryKey = '_id'``, because the ``_id`` field uniquely
+ identifies MongoDB documents
302
+- ``$keyType = 'string'``, because {+odm-short+} casts MongoDB
303
+ ``ObjectId`` values to type ``string``
304
305
Extended Class Example
306
~~~~~~~~~~~~~~~~~~~~~~
0 commit comments