Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Delete of soft deleted rows fails #627

@Jerry-Carter

Description

@Jerry-Carter

If you have soft delete enabled, deleting a row will set the column associated with the 'deletedAtKey'. Following this with a forced delete will not result in the row being deleted. The following SQL is generated on PostgreSQL:

DELETE FROM "MyTable" WHERE ("MyTable"."deletedAt" IS NULL OR "MyTable"."deletedAt" > ($1)) AND "MyTable"."id" = ($2) [0x00022aab9bdf99ee (TIMESTAMP), 24 (BIGINT)]

where the timestamp ($1) is after the deletedAtKey column value. The fix may be as simple as changing '>' to '<'. There is currently not a unit test for this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions