replace retval of ToDB with {}interface(nil)
instead of []byte(nil)
This commit is contained in:
parent
ad69f7d8f0
commit
19b206912e
|
@ -541,6 +541,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
|
||||
|
@ -553,6 +556,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
|
||||
|
|
|
@ -305,8 +305,10 @@ func (statement *Statement) buildUpdates(bean interface{},
|
|||
if err != nil {
|
||||
engine.logger.Error(err)
|
||||
} else {
|
||||
if data != nil {
|
||||
val = data
|
||||
}
|
||||
}
|
||||
goto APPEND
|
||||
}
|
||||
}
|
||||
|
@ -316,8 +318,10 @@ func (statement *Statement) buildUpdates(bean interface{},
|
|||
if err != nil {
|
||||
engine.logger.Error(err)
|
||||
} else {
|
||||
if data != nil {
|
||||
val = data
|
||||
}
|
||||
}
|
||||
goto APPEND
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue