File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,6 @@ func (x *xPlugin) onBeforeQuery() xPluginCallback {
3535
3636 model := reflect .New (db .Statement .Schema .ModelType )
3737
38- scopeList := []scopes.Scope {}
39-
4038 // Process Scopes
4139 for i := 0 ; i < model .NumMethod (); i ++ {
4240 name := model .Type ().Method (i ).Name
@@ -45,16 +43,11 @@ func (x *xPlugin) onBeforeQuery() xPluginCallback {
4543 method , ok := model .Method (i ).Interface ().(scopes.Scope )
4644
4745 if ok {
48- scopeList = append (scopeList , method )
49- // db = method(db)
46+ db = method (db )
5047 }
5148 }
5249 }
5350
54- if len (scopeList ) > 0 {
55- db = db .Scopes (scopeList ... )
56- }
57-
5851 // Process Tags
5952 for _ , field := range db .Statement .Schema .Fields {
6053 method := model .MethodByName ("Preload" + field .Name )
You can’t perform that action at this time.
0 commit comments