Merge 19b206912e
into 33fc33b2f5
This commit is contained in:
commit
300ba98369
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue