parent
845e343cad
commit
e2e54d57c9
|
@ -550,7 +550,8 @@ func genCols(table *core.Table, session *Session, bean interface{}, useCol bool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime {
|
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime && !isZero(fieldValue.Interface()) {
|
||||||
|
// if time is non-empty, then set to auto time
|
||||||
val, t := session.Engine.NowTime2(col.SQLType.Name)
|
val, t := session.Engine.NowTime2(col.SQLType.Name)
|
||||||
args = append(args, val)
|
args = append(args, val)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue