mirror of https://github.com/go-gorm/gorm.git
check isIgnored when compiling attrs to update
This commit is contained in:
parent
2166649409
commit
73c47b90fe
|
@ -65,7 +65,7 @@ func convertInterfaceToMap(values interface{}) map[string]interface{} {
|
||||||
default:
|
default:
|
||||||
scope := Scope{Value: values}
|
scope := Scope{Value: values}
|
||||||
for _, field := range scope.Fields() {
|
for _, field := range scope.Fields() {
|
||||||
if !field.IsBlank {
|
if !field.IsBlank && !field.IsIgnored {
|
||||||
attrs[field.DBName] = field.Field.Interface()
|
attrs[field.DBName] = field.Field.Interface()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue