From a8a530db5a78f0c5719f3ea8b0970de637245da5 Mon Sep 17 00:00:00 2001 From: aimuz Date: Thu, 17 Oct 2019 23:38:37 +0800 Subject: [PATCH] SetColumn No fields ignored were processed (#2579) --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index c962c165..e64a8ba8 100644 --- a/scope.go +++ b/scope.go @@ -225,7 +225,7 @@ func (scope *Scope) SetColumn(column interface{}, value interface{}) error { updateAttrs[field.DBName] = value return field.Set(value) } - if (field.DBName == dbName) || (field.Name == name && mostMatchedField == nil) { + if !field.IsIgnored && ((field.DBName == dbName) || (field.Name == name && mostMatchedField == nil)) { mostMatchedField = field } }