mirror of
https://github.com/go-gorm/gorm.git
synced 2025-03-15 17:47:28 +00:00
fix: added SkipHooks
in db getInstance()
(#6484)
This commit is contained in:
11
gorm.go
11
gorm.go
@ -399,11 +399,12 @@ func (db *DB) getInstance() *DB {
|
||||
if db.clone == 1 {
|
||||
// clone with new statement
|
||||
tx.Statement = &Statement{
|
||||
DB: tx,
|
||||
ConnPool: db.Statement.ConnPool,
|
||||
Context: db.Statement.Context,
|
||||
Clauses: map[string]clause.Clause{},
|
||||
Vars: make([]interface{}, 0, 8),
|
||||
DB: tx,
|
||||
ConnPool: db.Statement.ConnPool,
|
||||
Context: db.Statement.Context,
|
||||
Clauses: map[string]clause.Clause{},
|
||||
Vars: make([]interface{}, 0, 8),
|
||||
SkipHooks: db.Statement.SkipHooks,
|
||||
}
|
||||
} else {
|
||||
// with clone statement
|
||||
|
Reference in New Issue
Block a user