From 741d90f03855bf93e60a6405ae8230cc7e727168 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 21 Feb 2020 19:20:15 +0800 Subject: [PATCH] Fix test for mssql time --- engine.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine.go b/engine.go index c23b1999..2921911f 100644 --- a/engine.go +++ b/engine.go @@ -96,7 +96,9 @@ func (engine *Engine) CondDeleted(col *core.Column) builder.Cond { if col.SQLType.IsNumeric() { cond = builder.Eq{col.Name: 0} } else { - cond = builder.Eq{col.Name: zeroTime1} + if col.SQLType.IsTime() || engine.dialect.DBType() != core.MSSQL { + cond = builder.Eq{col.Name: zeroTime1} + } } if col.Nullable {