improve soft deleting feature for package gdb

This commit is contained in:
John
2020-04-11 10:14:49 +08:00
parent c08739b5a3
commit 8e6018cfff

View File

@ -78,6 +78,9 @@ func (m *Model) getSoftFieldName(table string, key string) (field string) {
// "user LEFT JOIN user_detail ON(user_detail.uid=user.uid)"
// "user u LEFT JOIN user_detail ud ON(ud.uid=u.uid) LEFT JOIN user_stats us ON(us.uid=u.uid)"
func (m *Model) getConditionForSoftDeleting() string {
if m.unscoped {
return ""
}
conditionArray := garray.NewStrArray()
if gstr.Contains(m.tables, " JOIN ") {
// Base table.