buunguyen / mongoose-deep-populate

Mongoose plugin to enable deep population of nested models ⛺
MIT License
469 stars 44 forks source link

How do you select parent level fields using deepPopulate? #50

Open bostondevin opened 7 years ago

bostondevin commented 7 years ago

How do you specify select fields for the parent document when you are using deepPopulate?

I can specify the select for child objects this way just fine:

.deepPopulate('createdBy', {populate: {createdBy: {select: 'firstName lastName _id'}});

But for the parent object, I want to do the same? What would the syntax be for that?

charles-passille-smartnets commented 7 years ago

@bostondevin I don't know how to do what you're asking, but it seems that this project is not being maintained anymore, i would suggest looking for help on stack overflow or something like that.

mariohmol commented 7 years ago

Hi, @charles-passille-smartnets have you found a good replace for this repo? thanks