From f9bd6bcc6418ccd5fcc54862b3b6568747f894a8 Mon Sep 17 00:00:00 2001 From: li3p Date: Thu, 16 Apr 2015 14:28:55 +0800 Subject: [PATCH] look up the Field.Name at Scope.SetColumn --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index c42c6afb..f1733aa3 100644 --- a/scope.go +++ b/scope.go @@ -164,7 +164,7 @@ func (scope *Scope) SetColumn(column interface{}, value interface{}) error { return field.Set(value) } - dbName = ToDBName(name) + dbName := ToDBName(name) if field, ok := scope.Fields()[dbName]; ok { return field.Set(value) }