Fix number of columns affected. Is always one. The old parameter was the numer of fields affected

This commit is contained in:
Paolo Galeone 2014-12-08 20:33:31 +01:00
parent 907ea93b43
commit e30cf3bbd1
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}
}