Fix test for mssql time

This commit is contained in:
Lunny Xiao 2020-02-21 19:20:15 +08:00
parent 92bb9f5e4d
commit 741d90f038
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 3 additions and 1 deletions

View File

@ -96,8 +96,10 @@ func (engine *Engine) CondDeleted(col *core.Column) builder.Cond {
if col.SQLType.IsNumeric() { if col.SQLType.IsNumeric() {
cond = builder.Eq{col.Name: 0} cond = builder.Eq{col.Name: 0}
} else { } else {
if col.SQLType.IsTime() || engine.dialect.DBType() != core.MSSQL {
cond = builder.Eq{col.Name: zeroTime1} cond = builder.Eq{col.Name: zeroTime1}
} }
}
if col.Nullable { if col.Nullable {
cond = cond.Or(builder.IsNull{col.Name}) cond = cond.Or(builder.IsNull{col.Name})