Skip to content

Commit

Permalink
fix: added SkipHooks in db getInstance() (#6484)
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushacharya authored Aug 4, 2023
1 parent 193c454 commit f473761
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f473761

Please sign in to comment.