mirror of https://github.com/go-gorm/gorm.git
look up the Field.Name at Scope.SetColumn
This commit is contained in:
parent
7966cde514
commit
f9bd6bcc64
2
scope.go
2
scope.go
|
@ -164,7 +164,7 @@ func (scope *Scope) SetColumn(column interface{}, value interface{}) error {
|
||||||
return field.Set(value)
|
return field.Set(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
dbName = ToDBName(name)
|
dbName := ToDBName(name)
|
||||||
if field, ok := scope.Fields()[dbName]; ok {
|
if field, ok := scope.Fields()[dbName]; ok {
|
||||||
return field.Set(value)
|
return field.Set(value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue