From a879e412a1986770dfc0f0e7470c7a248c20066c Mon Sep 17 00:00:00 2001 From: slene Date: Wed, 19 Mar 2014 09:46:09 +0800 Subject: [PATCH] #514 --- orm/models_test.go | 2 +- orm/models_utils.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/orm/models_test.go b/orm/models_test.go index 8564dcb8..e37e53d9 100644 --- a/orm/models_test.go +++ b/orm/models_test.go @@ -194,7 +194,7 @@ type User struct { UserName string `orm:"size(30);unique"` Email string `orm:"size(100)"` Password string `orm:"size(100)"` - Status int16 + Status int16 `orm:"column(Status)"` IsStaff bool IsActive bool `orm:"default(1)"` Created time.Time `orm:"auto_now_add;type(date)"` diff --git a/orm/models_utils.go b/orm/models_utils.go index f6cb14ec..d8d7cc25 100644 --- a/orm/models_utils.go +++ b/orm/models_utils.go @@ -80,7 +80,6 @@ func getTableUnique(val reflect.Value) [][]string { // get snaked column name func getColumnName(ft int, addrField reflect.Value, sf reflect.StructField, col string) string { - col = strings.ToLower(col) column := col if col == "" { column = snakeString(sf.Name)