mirror of https://github.com/go-gorm/gorm.git
Surface errors emitted by `RowsAffected'.
This commit is contained in:
parent
27a442b5ec
commit
923ca15b6f
2
scope.go
2
scope.go
|
@ -300,7 +300,7 @@ func (scope *Scope) Exec() *Scope {
|
|||
|
||||
if !scope.HasError() {
|
||||
if result, err := scope.SqlDB().Exec(scope.Sql, scope.SqlVars...); scope.Err(err) == nil {
|
||||
if count, err := result.RowsAffected(); err == nil {
|
||||
if count, err := result.RowsAffected(); scope.Err(err) == nil {
|
||||
scope.db.RowsAffected = count
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue