buf fixed for conversion update

This commit is contained in:
Lunny Xiao 2014-05-15 22:32:57 +08:00
parent c7b8826cda
commit c46403574e
1 changed files with 5 additions and 3 deletions

View File

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