Skip to content

insert or update #362

@sadorowo

Description

@sadorowo

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions