Improve DeleteByID (#26904)

pull/26905/head^2
Lunny Xiao 1 year ago committed by GitHub
parent 1859c5b636
commit 0b10df67ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/db/context.go

@ -185,7 +185,7 @@ func DeleteByBean(ctx context.Context, bean any) (int64, error) {
// DeleteByID deletes the given bean with the given ID
func DeleteByID(ctx context.Context, id int64, bean any) (int64, error) {
return GetEngine(ctx).ID(id).NoAutoTime().Delete(bean)
return GetEngine(ctx).ID(id).NoAutoCondition().NoAutoTime().Delete(bean)
}
// FindIDs finds the IDs for the given table name satisfying the given condition

Loading…
Cancel
Save