insert or update
sadorowo opened this issue · comments
Is this even possible? I want to update document if it exists, otherwise create a new document.
Example:
await Model
.insertOrUpdate(
{ primaryKey: "sth" },
{ first: 1, next: 2 }
)
// this should update document or insert new: { primaryKey: "sth", first: 1, next: 2 }