Merge fa40f1e789
into 33fc33b2f5
This commit is contained in:
commit
ff4a702e55
|
@ -396,6 +396,9 @@ func (statement *Statement) buildUpdates(bean interface{},
|
||||||
val = engine.formatColTime(col, t)
|
val = engine.formatColTime(col, t)
|
||||||
} else if nulType, ok := fieldValue.Interface().(driver.Valuer); ok {
|
} else if nulType, ok := fieldValue.Interface().(driver.Valuer); ok {
|
||||||
val, _ = nulType.Value()
|
val, _ = nulType.Value()
|
||||||
|
if val == nil && !requiredField {
|
||||||
|
continue
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if !col.SQLType.IsJson() {
|
if !col.SQLType.IsJson() {
|
||||||
engine.autoMapType(fieldValue)
|
engine.autoMapType(fieldValue)
|
||||||
|
|
Loading…
Reference in New Issue