|
query = query.populate(parseCommaParam(populate)); |
My suggestion is to remove the parseCommaParam function because the benefit is greater to use the population function like populate({ path: 'author', select: 'name' })...
Band.
find({}).
populate({ path: 'members', select: 'name' }).
exec(function(error, bands) {
// Won't work, foreign field `band` is not selected in the projection
});
Source https://mongoosejs.com/docs/populate.html
restify-mongoose/index.js
Line 208 in 1c01c5b
My suggestion is to remove the parseCommaParam function because the benefit is greater to use the population function like populate({ path: 'author', select: 'name' })...
Source https://mongoosejs.com/docs/populate.html