SetColumn No fields ignored were processed (#2579)

This commit is contained in:
aimuz 2019-10-17 23:38:37 +08:00 committed by Jinzhu
parent b99f2d8270
commit a8a530db5a
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ func (scope *Scope) SetColumn(column interface{}, value interface{}) error {
updateAttrs[field.DBName] = value updateAttrs[field.DBName] = value
return field.Set(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 mostMatchedField = field
} }
} }