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 updat…
…e() (#1580) Re: Automattic/mongoose#5839 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.
- Loading branch information