From 8dcef74e9a3a1d5941687242354e58e7b1857f2d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 28 Feb 2015 16:15:12 +0800 Subject: [PATCH] bug fixed --- helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers.go b/helpers.go index 88ba60a0..4569c37d 100644 --- a/helpers.go +++ b/helpers.go @@ -338,7 +338,10 @@ func genCols(table *core.Table, session *Session, bean interface{}, useCol bool, if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime { val, t := session.Engine.NowTime2(col.SQLType.Name) args = append(args, val) + + var colName = col.Name session.afterClosures = append(session.afterClosures, func(bean interface{}) { + col := table.GetColumn(colName) v, _ := col.ValueOf(bean) switch v.Type().Kind() { case reflect.Struct: