forked from mirror/gorm
Fix number of columns affected. Is always one. The old parameter was the numer of fields affected
This commit is contained in:
parent
907ea93b43
commit
e30cf3bbd1
|
@ -72,7 +72,7 @@ func Create(scope *Scope) {
|
|||
if names, columnsErr := rows.Columns(); columnsErr != nil {
|
||||
ids := make([]interface{}, len(names))
|
||||
if scope.Err(rows.Scan(ids...)) == nil {
|
||||
scope.db.RowsAffected = int64(len(names))
|
||||
scope.db.RowsAffected = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue