resolved #468
This commit is contained in:
parent
539f1099db
commit
e653751f49
|
@ -550,7 +550,7 @@ func genCols(table *core.Table, session *Session, bean interface{}, useCol bool,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime && !isZero(fieldValue.Interface()) {
|
if (col.IsCreated || col.IsUpdated) && session.Statement.UseAutoTime && isZero(fieldValue.Interface()) {
|
||||||
// if time is non-empty, then set to auto time
|
// 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