Skip to content

Commit

Permalink
Merge pull request #183 from zhu1230/cast_id_in_doc
Browse files Browse the repository at this point in the history
add castIds into doc
  • Loading branch information
mathieudutour authored Mar 13, 2017
2 parents 88caf69 + 789efcf commit 297e11a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/id.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Casts a string to (or create) an [ObjectId](https://docs.mongodb.com/manual/reference/method/ObjectId/).

In order to use custom id, castIds needs to be explicitly set to false as an option in collection operations.

#### Arguments

1. [`string`] *(string)*: optional hex id to cast to ObjectId. If not provided, a random ObjectId will be created.
Expand Down

0 comments on commit 297e11a

Please sign in to comment.