该文件说,你可以像这样实现的:
// Retrieving only certain fields
Model.find({}, 'first last', function (err, docs) {
});
// Retrieving only certain fields
Model.find({}, ['first', 'last'], function (err, docs) {
// docs is an array of partially-`init`d documents
// defaults are still applied and will be "populated"
});
因此,您无需执行此操作select()
。