Update finisher_api.go

add tx.Statement.RaiseErrorOnNotFound = true for finisher method Find
This commit is contained in:
Sachin 2021-03-05 18:56:49 -08:00 committed by GitHub
parent a948c84607
commit 81eb56c1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,7 @@ func (db *DB) Find(dest interface{}, conds ...interface{}) (tx *DB) {
tx.Statement.AddClause(clause.Where{Exprs: exprs})
}
}
tx.Statement.RaiseErrorOnNotFound = true
tx.Statement.Dest = dest
tx.callbacks.Query().Execute(tx)
return