Skip to content

Commit

Permalink
JT tech review 1
Browse files Browse the repository at this point in the history
  • Loading branch information
rustagir committed Jul 23, 2024
1 parent bd7f587 commit 14b3b3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/eloquent-models/model-class.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ MongoDB.
When you apply the ``DocumentModel`` trait to a model class, you must
declare the following properties in your class:

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

Extended Class Example
~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 14b3b3f

Please sign in to comment.