Skip to content

Commit

Permalink
SetColumn No fields ignored were processed (go-gorm#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
aimuz authored and jinzhu committed Oct 17, 2019
1 parent b99f2d8 commit a8a530d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit a8a530d

Please sign in to comment.