From c46403574ee97d2779220f57bdfed7b347c4cabb Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 15 May 2014 22:32:57 +0800 Subject: [PATCH] buf fixed for conversion update --- statement.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/statement.go b/statement.go index e0cb0b70..707f9c1d 100644 --- a/statement.go +++ b/statement.go @@ -310,7 +310,7 @@ func buildUpdates(engine *Engine, table *core.Table, bean interface{}, } else { val = data } - continue + goto APPEND } } @@ -321,7 +321,7 @@ func buildUpdates(engine *Engine, table *core.Table, bean interface{}, } else { val = data } - continue + goto APPEND } if fieldType.Kind() == reflect.Ptr { @@ -440,6 +440,8 @@ func buildUpdates(engine *Engine, table *core.Table, bean interface{}, val = fieldValue.Interface() } + APPEND: + //fmt.Println("==", col.Name, "==", fmt.Sprintf("%v", val)) args = append(args, val) if col.IsPrimaryKey && engine.dialect.DBType() == "ql" { continue @@ -960,7 +962,7 @@ func (statement *Statement) genGetSql(bean interface{}) (string, []interface{}) if columnStr == "" { columnStr = statement.genColumnStr() } - + statement.attachInSql() // !admpub! fix bug:Iterate func missing "... IN (...)" return statement.genSelectSql(columnStr), append(statement.Params, statement.BeanArgs...) }