Closed calldeludo closed 4 years ago
i found the solution.
children: [{ type: mongoose.Schema.Types.ObjectId, ref: 'categorias', autopopulate: { select: '-productos' },
}],
Autopopulate accepts options then you can select or unselect the fields that you want exclude
Hello, i am trying to control the fields that are populated but i don't know how to do it, i searched in the solved issued but could not find any solution.
Here is my Schema:
I would like to remove Productos from the children autopopulate.... example of output...
Any idea? Thank you in advance