This commit is contained in:
MURAOKA Taro 2019-10-08 14:19:17 +00:00 committed by GitHub
commit ff4a702e55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -396,6 +396,9 @@ func (statement *Statement) buildUpdates(bean interface{},
val = engine.formatColTime(col, t)
} else if nulType, ok := fieldValue.Interface().(driver.Valuer); ok {
val, _ = nulType.Value()
if val == nil && !requiredField {
continue
}
} else {
if !col.SQLType.IsJson() {
engine.autoMapType(fieldValue)