File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,6 @@ import (
16
16
17
17
func GetFilterMap (m interface {}, globalTablePrefix string ) map [string ]model.FilterMapValue {
18
18
name := getName (m )
19
- if val , exists := getCache (name ); exists {
20
- return val
21
- }
22
-
23
19
filterMap := make (map [string ]model.FilterMapValue )
24
20
25
21
// TypeOf returns the reflection Type that represents the dynamic type of variable.
@@ -60,12 +56,13 @@ func GetFilterMap(m interface{}, globalTablePrefix string) map[string]model.Filt
60
56
// Get the field tag value
61
57
filterTag := field .Tag .Get ("filter" )
62
58
dbTag := field .Tag .Get ("gorm" )
63
- f := model.FilterMapValue {
64
- Model : name ,
65
- }
66
59
67
60
// Filter -> Schema mapping
68
61
if filterTag != "" && filterTag != "-" {
62
+ f := model.FilterMapValue {
63
+ Model : name ,
64
+ }
65
+
69
66
f .Schema = getFilterTagSchema (filterTag )
70
67
parts := strings .Split (filterTag , "," )
71
68
@@ -89,11 +86,11 @@ func GetFilterMap(m interface{}, globalTablePrefix string) map[string]model.Filt
89
86
f .Field = fmt .Sprintf ("%s%s" , tablePrefix , database .QuoteTableName (matches [1 ]))
90
87
}
91
88
}
89
+
92
90
filterMap [parts [0 ]] = f
93
91
}
94
92
}
95
93
96
- setCache (name , filterMap )
97
94
return filterMap
98
95
}
99
96
You can’t perform that action at this time.
0 commit comments