Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft Delete field type #223

Open
blalan05 opened this issue Aug 14, 2023 · 0 comments
Open

Soft Delete field type #223

blalan05 opened this issue Aug 14, 2023 · 0 comments

Comments

@blalan05
Copy link

Is your feature request related to a problem? Please describe.
A common DB ORM feature is the ability to have a deletedAt date column that gets updated with deleting, so the row isn't actually deleted, but there is a simply way to not return deleted with a flag.

Describe the solution you'd like
Add deletedAt field type (similar to createdAt and updatedAt), that is controlled by API if softDelete (or paranoid) flag on entity. If softDelete (or paranoid) flag on Entity, then { where: { deletedAt: null } } filter should be automatically added in find

Describe alternatives you've considered
All this could be done in userland with a lot of boilerplate.

Additional context
Elequent ORM example
Sequelize example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants