diff --git a/callbacks/preload.go b/callbacks/preload.go index e1dfdace..c2304af8 100644 --- a/callbacks/preload.go +++ b/callbacks/preload.go @@ -13,7 +13,7 @@ func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) { var ( reflectValue = db.Statement.ReflectValue rel = rels[len(rels)-1] - tx = db.Session(&gorm.Session{NewDB: true}) + tx = db.Session(&gorm.Session{NewDB: true, SkipHooks: db.Statement.SkipHooks}) relForeignKeys []string relForeignFields []*schema.Field foreignFields []*schema.Field