look up the Field.Name at Scope.SetColumn

This commit is contained in:
li3p 2015-04-16 14:28:55 +08:00
parent 7966cde514
commit f9bd6bcc64
1 changed files with 1 additions and 1 deletions

View File

@ -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)
} }