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

Can soft delete specify a delId field that is set to the value of id instead of creation time to avoid deletion conflicts? #7186

Open
thislyc opened this issue Sep 4, 2024 · 1 comment
Assignees
Labels
type:feature_request feature request

Comments

@thislyc
Copy link

thislyc commented Sep 4, 2024

Describe the feature

The feature request is to enhance the soft delete functionality by allowing the specification of a delId field. This field would be set to the value of the id field (or another unique identifier) instead of using the creation time when marking a record as deleted. This approach aims to provide a unique and consistent reference for each deleted record, reducing the risk of conflicts or ambiguities that may arise when relying on timestamps.

Motivation

The motivation behind this feature is to address potential conflicts and ambiguities in systems that utilize soft deletes. By using the id field, which is inherently unique, as the value for the delId field, we can ensure that each deletion operation is traceable and distinct. This can be particularly beneficial in systems with high concurrency or those that require precise audit trails. Additionally, using the id field helps in maintaining referential integrity and simplifying queries that involve deleted records.

Related Issues

#4047

@github-actions github-actions bot added the type:feature_request feature request label Sep 4, 2024
@thislyc
Copy link
Author

thislyc commented Sep 4, 2024

@jinzhu I can provide a pr, which github repository should it be in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request feature request
Projects
None yet
Development

No branches or pull requests

2 participants