forked from mirror/gorm
SetColumn No fields ignored were processed (#2579)
This commit is contained in:
parent
b99f2d8270
commit
a8a530db5a
2
scope.go
2
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue