diff --git a/callbacks/query.go b/callbacks/query.go index 5a97e1ad..658216df 100644 --- a/callbacks/query.go +++ b/callbacks/query.go @@ -172,7 +172,9 @@ 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] = map[string][]interface{}{} + if _, ok := preloadMap[rel.Name]; !ok { + preloadMap[rel.Name] = map[string][]interface{}{} + } } } } else {