diff --git a/gorm.go b/gorm.go index c506c6f3..1c6d3383 100644 --- a/gorm.go +++ b/gorm.go @@ -87,6 +87,10 @@ func Open(dialector Dialector, config *Config) (db *DB, err error) { config.Dialector = dialector } + if config.Plugins == nil { + config.Plugins = map[string]Plugin{} + } + if config.cacheStore == nil { config.cacheStore = &sync.Map{} }