From 788f4009579f4565e8127a83bdb89496bfdeaf2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B8=AA=E0=B8=B2=E0=B8=98=E0=B8=B8=E0=B8=8A=E0=B8=99=20?= =?UTF-8?q?=E0=B8=93=E0=B8=B8?= Date: Mon, 31 Oct 2022 14:54:00 +0700 Subject: [PATCH] refresh cache store --- schema/schema.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schema/schema.go b/schema/schema.go index 9b3d30f6..44ef46ed 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -82,6 +82,8 @@ func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error) // ParseWithSpecialTableName get data type from dialector with extra schema table func ParseWithSpecialTableName(dest interface{}, cacheStore *sync.Map, namer Namer, specialTableName string) (*Schema, error) { + cacheStore = &sync.Map{} // refresh cache store + if dest == nil { return nil, fmt.Errorf("%w: %+v", ErrUnsupportedDataType, dest) }