Skip to content

Glossary: MongoDB

Upsert

Also written: upsert: true

An update that inserts a new document when nothing matches the filter. You request it with `{ upsert: true }`.

Where the book teaches it

Related terms

updateOne / updateMany