rollback
This commit is contained in:
parent
e763dee703
commit
5ef368402a
|
@ -118,18 +118,11 @@ func createCallback(scope *Scope) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if scope.Dialect().GetName() == "h2" {
|
if err := scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...).Scan(primaryField.Field.Addr().Interface()); scope.Err(err) == nil {
|
||||||
_, err := scope.SQLDB().Exec(scope.SQL, scope.SQLVars...)
|
primaryField.IsBlank = false
|
||||||
if scope.Err(err) == nil {
|
scope.db.RowsAffected = 1
|
||||||
primaryField.IsBlank = false
|
}
|
||||||
scope.db.RowsAffected = 1
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if err := scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...).Scan(primaryField.Field.Addr().Interface()); scope.Err(err) == nil {
|
|
||||||
primaryField.IsBlank = false
|
|
||||||
scope.db.RowsAffected = 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user