Automattic / Automattic/mongoose

Handle `$pull` update validators separately from `$set`

Open
#6,960 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
35

Description

There's a lot of quirks like `$in` (#4440) and array vs single object (#6889) that make update validators pretty brittle with `$pull`. We should separate this out.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how Mongoose handles update validators for `$pull` and `$set`. Review the quirks described in issues #4440 and #6889, then define the separate `$pull` behavior and verify that the existing validator cases no longer share the brittle handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.