Skip to content

Add support for soft deletes #649

Open
@eduanb

Description

@eduanb

With Hibernate and Spring Data JPA you can do a soft delete like this:

@SQLDelete(sql = "UPDATE user SET deleted = true WHERE id = ?", check = ResultCheckStyle.COUNT)
@Where(clause = "deleted = false")
class User {
 ...
}

Now when you do a delete from the repository it will just set deleted =true and with every select, it adds deleted = false.
Similar functionality in Spring Data R2DBC would be very useful.

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