Skip to content

Commit 6bb7472

Browse files
committed
populate method in mongoose
1 parent 12918e3 commit 6bb7472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MongoDB/populate-method-mongoose.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ var PostSchema = {
119119
ref: 'User',
120120
type: String
121121
}
122-
122+
123123
```
124124
125-
If you run this query: ``Post.find({}).populate('user').exec(callback)``, Mongoose will look at the field user in the post, see that it has a ref to the User model, and find that user by its _id
125+
If you run this query: ``Post.find({}).populate('user').exec(callback)``, Mongoose will look at the field user in the post, see that it has a ref to the User model, and find that user by its _id
126126
127127
128128
### Sources to read

0 commit comments

Comments
 (0)