From 0858efe4e34e8d95d47868b7e57bb0eeffb80ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=88=90=E9=94=B4?= Date: Sun, 26 Feb 2023 15:37:52 +0800 Subject: [PATCH] fix: move after_query position --- cache/query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/query.go b/cache/query.go index ac5ac48..7338b19 100644 --- a/cache/query.go +++ b/cache/query.go @@ -33,7 +33,7 @@ func (h *queryHandler) Bind(db *gorm.DB) error { if err != nil { return err } - err = db.Callback().Query().After("gorm:query").Register("gorm:cache:after_query", h.AfterQuery()) + err = db.Callback().Query().After("gorm:after_query").Register("gorm:cache:after_query", h.AfterQuery()) if err != nil { return err }