This commit is contained in:
MURAOKA Taro 2019-10-13 10:32:25 +00:00 committed by GitHub
commit 300ba98369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

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

View File

@ -319,7 +319,9 @@ func (statement *Statement) buildUpdates(bean interface{},
if err != nil {
engine.logger.Error(err)
} else {
val = data
if data != nil {
val = data
}
}
goto APPEND
}
@ -330,7 +332,9 @@ func (statement *Statement) buildUpdates(bean interface{},
if err != nil {
engine.logger.Error(err)
} else {
val = data
if data != nil {
val = data
}
}
goto APPEND
}