Skip to content

Commit

Permalink
Minor grammar fix in populate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amaurymedeiros committed Nov 10, 2015
1 parent 9c048d2 commit e863c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/populate.jade
Expand Up @@ -26,7 +26,7 @@ block content
var Story = mongoose.model('Story', storySchema);
var Person = mongoose.model('Person', personSchema);
:markdown
So far we've created two [Models](./models.html). Our `Person` model has it's `stories` field set to an array of `ObjectId`s. The `ref` option is what tells Mongoose which model to use during population, in our case the `Story` model. All `_id`s we store here must be document `_id`s from the `Story` model. We also declared the `Story` `_creator` property as a `Number`, the same type as the `_id` used in the `personSchema`. It is important to match the type of `_id` to the type of ref.
So far we've created two [Models](./models.html). Our `Person` model has its `stories` field set to an array of `ObjectId`s. The `ref` option is what tells Mongoose which model to use during population, in our case the `Story` model. All `_id`s we store here must be document `_id`s from the `Story` model. We also declared the `Story` `_creator` property as a `Number`, the same type as the `_id` used in the `personSchema`. It is important to match the type of `_id` to the type of ref.
.important
:markdown
**Note**: `ObjectId`, `Number`, `String`, and `Buffer` are valid for use as refs.
Expand Down

0 comments on commit e863c10

Please sign in to comment.