mirror of https://github.com/go-gorm/gorm.git
Assign transaction error to db
This commit is contained in:
parent
d483ffa45c
commit
7701c88507
|
@ -11,6 +11,8 @@ func BeginTransaction(db *gorm.DB) {
|
|||
db.InstanceSet("gorm:started_transaction", true)
|
||||
} else if tx.Error == gorm.ErrInvalidTransaction {
|
||||
tx.Error = nil
|
||||
} else {
|
||||
db.Error = tx.Error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue