mirror of https://github.com/go-gorm/gorm.git
Pass db error to new instance
This commit is contained in:
parent
f3bdfa8261
commit
ad53074f1d
2
gorm.go
2
gorm.go
|
@ -346,7 +346,7 @@ func (db *DB) DB() (*sql.DB, error) {
|
||||||
|
|
||||||
func (db *DB) getInstance() *DB {
|
func (db *DB) getInstance() *DB {
|
||||||
if db.clone > 0 {
|
if db.clone > 0 {
|
||||||
tx := &DB{Config: db.Config}
|
tx := &DB{Config: db.Config, Error: db.Error}
|
||||||
|
|
||||||
if db.clone == 1 {
|
if db.clone == 1 {
|
||||||
// clone with new statement
|
// clone with new statement
|
||||||
|
|
Loading…
Reference in New Issue