Update finisher_api.go
add tx.Statement.RaiseErrorOnNotFound = true for finisher method Find
This commit is contained in:
parent
a948c84607
commit
81eb56c1df
@ -165,6 +165,7 @@ func (db *DB) Find(dest interface{}, conds ...interface{}) (tx *DB) {
|
|||||||
tx.Statement.AddClause(clause.Where{Exprs: exprs})
|
tx.Statement.AddClause(clause.Where{Exprs: exprs})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tx.Statement.RaiseErrorOnNotFound = true
|
||||||
tx.Statement.Dest = dest
|
tx.Statement.Dest = dest
|
||||||
tx.callbacks.Query().Execute(tx)
|
tx.callbacks.Query().Execute(tx)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user