Skip to content

[docs] Does creating a new instance with the same primary key after a soft delete work? #9885

@jedwards1211

Description

@jedwards1211

I can't tell from the docs what will happen if I soft delete instance 42 on a paranoid mode model, and then later create a new instance with that same key. Does Sequelize overwrite the fields on the soft deleted row and set deletedAt to null in that case, or does it throw a duplicate key error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions