fix invalid UpdatedAt usage in soft deleting feature for package gdb (#2323)

This commit is contained in:
HaiLaz
2022-11-24 21:23:15 +08:00
committed by GitHub
parent fbeb8f81ac
commit 0a76b9c61b
2 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func (m *Model) getSoftFieldNameDeleted(table ...string) (field string) {
tableName = m.tablesInit
}
config := m.db.GetConfig()
if config.UpdatedAt != "" {
if config.DeletedAt != "" {
return m.getSoftFieldName(tableName, []string{config.DeletedAt})
}
return m.getSoftFieldName(tableName, deletedFiledNames)