Last active
December 31, 2015 16:49
-
-
Save deedubs/8016121 to your computer and use it in GitHub Desktop.
Example of populate query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Story | |
.find(...) | |
.populate({ | |
path: 'fans', | |
match: { age: { $gte: 21 }}, | |
select: 'name -_id', | |
options: { limit: 5 } | |
}) | |
.exec() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment