forked from mirror/gorm
Fix apply option
This commit is contained in:
parent
a8b72546c1
commit
0eba7a9ed1
4
gorm.go
4
gorm.go
|
@ -116,9 +116,9 @@ func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
|
||||||
if err := opt.Apply(config); err != nil {
|
if err := opt.Apply(config); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func(opt Option) {
|
||||||
opt.AfterInitialize(db)
|
opt.AfterInitialize(db)
|
||||||
}()
|
}(opt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue