Skip to content

Commit 5e42478

Browse files
authored
Merge pull request #4 from iagowp/patch-1
Added require on readme
2 parents dc570b6 + 3ef3bea commit 5e42478

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ You don't need to define the `id` field in your schema because the plugin automa
4242
UserSchema.plugin(AutoIncrement, {inc_field: 'id'});
4343
```
4444

45+
After requiring the plugin
46+
47+
`var AutoIncrement = require('mongoose-sequence');`
48+
4549
Every time a new user is created, the `id` field will have an incremental number. The operation is atomic and is based on [this](http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/) specification.
4650
A commodity collection named `counters` is created for you. You can override the name of this collection but we will see this later with the `options`.
4751

0 commit comments

Comments
 (0)