mirror of https://github.com/go-gorm/gorm.git
Add error if exists after parse query results
This commit is contained in:
parent
1092523ce2
commit
23abd03a95
|
@ -78,6 +78,10 @@ func queryCallback(scope *Scope) {
|
|||
}
|
||||
}
|
||||
|
||||
if err := rows.Err(); err != nil {
|
||||
scope.Err(err)
|
||||
}
|
||||
|
||||
if scope.db.RowsAffected == 0 && !isSlice {
|
||||
scope.Err(ErrRecordNotFound)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue