Pass db error to new instance

This commit is contained in:
Jinzhu 2021-04-09 11:07:14 +08:00
parent f3bdfa8261
commit ad53074f1d
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ func (db *DB) DB() (*sql.DB, error) {
func (db *DB) getInstance() *DB {
if db.clone > 0 {
tx := &DB{Config: db.Config}
tx := &DB{Config: db.Config, Error: db.Error}
if db.clone == 1 {
// clone with new statement