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

Make populate param multilevel #100

Merged
merged 2 commits into from
Jul 28, 2019
Merged

Make populate param multilevel #100

merged 2 commits into from
Jul 28, 2019

Conversation

jaysalvat
Copy link
Contributor

@jaysalvat jaysalvat commented May 30, 2019

Hello.
The populate params didn't behave as expected. Multiple levels should be handled in order to get relations in relations populated.

Here is a PR to help :)

?populate=level.level1.level2&fields=level.level1.name,level.level1.level2.age
population: {
    path: 'level',
    populate: {
        path: 'level1',
        select: 'name'
        populate: {
            path: 'level2',
            select: 'age'
        },
    },
}

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5f28d3f on jaysalvat:master into a744807 on loris:master.

@jaysalvat
Copy link
Contributor Author

Hello!
Do you plan to merge this PR?
Can I do something to make it better?
Thanks.

@jaysalvat
Copy link
Contributor Author

Ping :)

@loris loris merged commit 0297de5 into loris:master Jul 28, 2019
@loris
Copy link
Owner

loris commented Jul 28, 2019

Hi @jaysalvat Sorry for the delay, for whatever reason I had github email notifications off on that repo. Thanks for the PR! Publishing to npm right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants