Skip to content

Commit 0b10df6

Browse files
authored
Improve DeleteByID (#26904)
1 parent 1859c5b commit 0b10df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/db/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func DeleteByBean(ctx context.Context, bean any) (int64, error) {
185185

186186
// DeleteByID deletes the given bean with the given ID
187187
func DeleteByID(ctx context.Context, id int64, bean any) (int64, error) {
188-
return GetEngine(ctx).ID(id).NoAutoTime().Delete(bean)
188+
return GetEngine(ctx).ID(id).NoAutoCondition().NoAutoTime().Delete(bean)
189189
}
190190

191191
// FindIDs finds the IDs for the given table name satisfying the given condition

0 commit comments

Comments
 (0)