From 97b7731dcde46f5872e83a2102c4410b388116f8 Mon Sep 17 00:00:00 2001 From: nelsontang <379964426@qq.com> Date: Tue, 2 Jul 2024 21:33:58 +0800 Subject: [PATCH] Update create.go bugfix: When using the create or createInBatches methods with Byconity, RowsAffected is not set correctly --- create.go | 1 + 1 file changed, 1 insertion(+) diff --git a/create.go b/create.go index 780f5b8..ef1d39e 100644 --- a/create.go +++ b/create.go @@ -36,6 +36,7 @@ func (dialector *Dialector) Create(db *gorm.DB) { if _, err := stmt.Exec(value...); db.AddError(err) != nil { return } + db.RowsAffected++ } return }