fix conditions build on MSSQL

This commit is contained in:
CyJaySong 2023-07-14 17:50:54 +08:00
parent 7bb3224115
commit a6b31d79d7
1 changed files with 1 additions and 4 deletions

View File

@ -691,10 +691,7 @@ func (statement *Statement) CondDeleted(col *schemas.Column) builder.Cond {
if col.SQLType.IsNumeric() {
cond = builder.Eq{colName: 0}
} else {
// FIXME: mssql: The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
if statement.dialect.URI().DBType != schemas.MSSQL {
cond = builder.Eq{colName: utils.ZeroTime1}
}
cond = builder.Eq{colName: utils.ZeroTime1}
}
if col.Nullable {