diff --git a/callbacks/query.go b/callbacks/query.go index fff46d57..05b572f0 100644 --- a/callbacks/query.go +++ b/callbacks/query.go @@ -172,7 +172,7 @@ func Preload(db *gorm.DB) { if name == clause.Associations { for _, rel := range db.Statement.Schema.Relationships.Relations { if rel.Schema == db.Statement.Schema { - preloadMap[rel.Name] = nil + preloadMap[rel.Name] = map[string][]interface{}{} } } } else {