Merge db45aa596f9851656b5f6ad1614bc18bf5aaec97 into 89f6d74b5ebab61a964b7a69c865a16cf9f24821

This commit is contained in:
Prasetya, Samuel 2017-01-25 23:02:16 +00:00 committed by GitHub
commit 0a599b0c06

View File

@ -677,7 +677,7 @@ func (scope *Scope) whereSQL() (sql string) {
)
if !scope.Search.Unscoped && scope.HasColumn("deleted_at") {
sql := fmt.Sprintf("%v.deleted_at IS NULL", quotedTableName)
sql := fmt.Sprintf("(%v.deleted_at IS NULL OR %v.deleted_at = '0000-00-00 00:00:00')", quotedTableName, quotedTableName)
primaryConditions = append(primaryConditions, sql)
}