This commit is contained in:
peihexian 2019-10-08 05:44:57 +00:00 committed by GitHub
commit df5b4d818d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -558,6 +558,9 @@ func (session *Session) value2Interface(col *core.Column, fieldValue reflect.Val
if col.SQLType.IsBlob() {
return data, nil
}
if nil==data {
return nil,nil
}
return string(data), nil
}

View File

@ -329,9 +329,13 @@ func (statement *Statement) buildUpdates(bean interface{},
data, err := structConvert.ToDB()
if err != nil {
engine.logger.Error(err)
} else {
if nil==data {
val=nil
}else{
val = data
}
}
goto APPEND
}