Describe the feature
Well, currently the query gorm fires is: SELECT * FROM <table or view> WHERE deleted_at IS NULL
What should be fired would be: SELECT * FROM <table or view> WHERE deleted_at < NOW()
Motivation
This would really help when doing future deletes. Also it's more semantically correct. if a deleted_at column is in future, it's not deleted at this time. For current semantic to make sense, column would be a boolean and it'd be called "is_deleted"
Comment From: ghost
hello,you can look it https://gorm.io/zh_CN/docs/delete.html#Delete-permanently. it maybe solve this issue.
Comment From: li-jin-gou
It is now possible to delete soft-delete records by use unscope;
Comment From: cyberhck
I don't know if you understood correctly, I'm talking about setting deletion date in the future, so I'll get the records till the deletion date is past.
I don't think it works, because you fire query like: SELECT * FROM table WHERE deleted_at IS NULL what I'm asking is: SELECT * FROM table WHERE deleted_at < NOW()