修改IsDeleted的状态查询

在pqsql下测试通过
This commit is contained in:
TossPig 2014-11-23 17:58:09 +08:00
parent f898f5d6a4
commit 1f2355b1bf
1 changed files with 1 additions and 1 deletions

View File

@ -507,7 +507,7 @@ func buildConditions(engine *Engine, table *core.Table, bean interface{},
}
if col.IsDeleted && !unscoped { // tag "deleted" is enabled
colNames = append(colNames, fmt.Sprintf("%v IS NULL", engine.Quote(col.Name)))
colNames = append(colNames, fmt.Sprintf("(%v IS NULL or %v = '0001-01-01 00:00:00') ", engine.Quote(col.Name), engine.Quote(col.Name)))
}
fieldValue := *fieldValuePtr