From de609de5b3971928f340d0eae150633d1647238a Mon Sep 17 00:00:00 2001 From: Gerhard Gruber Date: Tue, 23 Nov 2021 14:44:27 +0100 Subject: [PATCH] order by for delete not supported --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 42e78723..5d95f910 100644 --- a/main.go +++ b/main.go @@ -447,7 +447,7 @@ func (s *DB) Create(value interface{}) *DB { // Delete delete value match given conditions, if the value has primary key, then will including the primary key as condition func (s *DB) Delete(value interface{}, where ...interface{}) *DB { - return s.NewScope(value).inlineCondition(where...).callCallbacks(s.parent.callbacks.deletes).db + return s.Order(nil, true).NewScope(value).inlineCondition(where...).callCallbacks(s.parent.callbacks.deletes).db } // Raw use raw sql as conditions, won't run it unless invoked by other methods