Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model.populate() does not mention the populate option #11170

Closed
IslandRhythms opened this issue Jan 3, 2022 · 1 comment
Closed

Model.populate() does not mention the populate option #11170

IslandRhythms opened this issue Jan 3, 2022 · 1 comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Milestone

Comments

@IslandRhythms
Copy link
Collaborator

I've seen a few scripts now of people using populate as an option in their populate functions. From what I can tell its another way to do a nested/chain populate however the docs don't mention it at all.

@IslandRhythms IslandRhythms added the docs This issue is due to a mistake or omission in the mongoosejs.com documentation label Jan 3, 2022
@vkarpov15 vkarpov15 added priority Automatically set for Mongoose Pro subscribers and removed priority Automatically set for Mongoose Pro subscribers labels Jan 3, 2022
@vkarpov15 vkarpov15 modified the milestones: 6.1.7, 6.1.9 Jan 5, 2022
@twhy
Copy link

twhy commented Feb 8, 2022

@IslandRhythms I find this example in docs about the populate option at document level.
Populating across multiple levels
https://mongoosejs.com/docs/populate.html#deep-populate

User.
  findOne({ name: 'Val' }).
  populate({
    path: 'friends',
    // Get friends of friends - populate the 'friends' array for every friend
    populate: { path: 'friends' }
  });

@vkarpov15 vkarpov15 modified the milestones: 6.2.2, 6.2.3 Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This issue is due to a mistake or omission in the mongoosejs.com documentation
Projects
None yet
Development

No branches or pull requests

3 participants