Skip to content

Commit

Permalink
fix: replace conn pool (go-gorm#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb authored Dec 19, 2022
1 parent be69be0 commit 15d19c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion do.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (d *DO) ReplaceDB(db *gorm.DB) { d.db = db }

// ReplaceConnPool replace db connection pool
func (d *DO) ReplaceConnPool(pool gorm.ConnPool) {
d.db = d.db.Session(&gorm.Session{Initialized: true})
d.db = d.db.Session(&gorm.Session{})
d.db.Statement.ConnPool = pool
}

Expand Down

0 comments on commit 15d19c4

Please sign in to comment.