Popular em Mongoose Campos selecionados
Model
.find(query)
.populate({
path: 'key_with_ref',
select: ['field_1', 'field_2']
});
Stupid Spider
Model
.find(query)
.populate({
path: 'key_with_ref',
select: ['field_1', 'field_2']
});
Model
.find(query)
.populate({
path: 'key_with_ref',
model: 'model_name',
select: { 'field_name': 1,'field_name':1},
})
-OR-
Model
.find(query)
.populate({
path: 'key_with_ref',
model: 'model_name',
select: 'field_name, field_name',
})