Automattic / Automattic/mongoose
.select on create or update of a model.
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 27.5k
- Forks
- 4k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 35
Description
It would be nice to be able to select the returned fields from a create/update request.
eg.
```
myModel.create(data).select('name.first').exec(function (err, data) {
//Data only has name.first
});
```
Contributor guide
Research direction
Start at the model create and update entry points and follow the execution path used by the shown .select('name.first').exec example. Compare how returned fields are handled for both operations. Done means the callback data for create and update contains only the selected field, with the behavior covered by the relevant existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb, nodejs
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100