Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(collection): allow { upsert: 1 } for findOneAndUpdate() and update()
This is a very rough edge in the API where findAndModify() treats upsert: 1 as upsert: true, but findOneAndUpdate() and updateX() treat upsert: 1 as upsert: false. CRUD spec does say upsert is a boolean but we've had upsert: 1 in shell examples for a while so it may be worthwhile to support both, especially since truthiness is so common in JS. Port of #1580 to 3.0.0
- Loading branch information