-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: TypeScript
Description
The findOneAndUpdate method supports aggregation pipelines in the update argument. However, the documentation and types do not indicate this functionality.
User Experience
- The aggregation pipeline functionality of findOneAndUpdate should be explicitly documented.
Acceptance Criteria
Implementation Requirements
- Add API comments explaining that, for findOneAndUpdate:
- `UpdateFilter<TSchema>` covers a document that contains update operator expressions
- `Document[]` covers aggregation pipelines in the update filter
- The types for findOneAndUpdate should be updated to explicitly include a Document[] type for the update parameter
Testing Requirements
- Integration tests verifying that aggregation pipelines work with findOneAndUpdate
- Type tests verifying that aggregation pipelines work with findOneAndUpdate
Documentation Requirements
- See Above
Follow Up Requirements
- N/A