mirror of https://github.com/go-gorm/gorm.git
Fix duplicated soft delete clause
This commit is contained in:
parent
e73147fa8e
commit
bf6123b01e
|
@ -25,14 +25,7 @@ func (n DeletedAt) Value() (driver.Value, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (DeletedAt) QueryClauses(f *schema.Field) []clause.Interface {
|
func (DeletedAt) QueryClauses(f *schema.Field) []clause.Interface {
|
||||||
return []clause.Interface{
|
return []clause.Interface{SoftDeleteQueryClause{Field: f}}
|
||||||
clause.Where{Exprs: []clause.Expression{
|
|
||||||
clause.Eq{
|
|
||||||
Column: clause.Column{Table: clause.CurrentTable, Name: f.DBName},
|
|
||||||
Value: nil,
|
|
||||||
},
|
|
||||||
}},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type SoftDeleteQueryClause struct {
|
type SoftDeleteQueryClause struct {
|
||||||
|
|
Loading…
Reference in New Issue