From b9574df49f49777a2807f2fd3f7200bc858564fb Mon Sep 17 00:00:00 2001 From: Taufan Adhitya Date: Wed, 2 Oct 2024 15:27:22 +0700 Subject: [PATCH] fix: clean up --- pkg/db/relation.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/db/relation.go b/pkg/db/relation.go index bf158e1e..04666b23 100644 --- a/pkg/db/relation.go +++ b/pkg/db/relation.go @@ -31,8 +31,6 @@ func (q *Query) Preload(table string, args ...string) *Query { relations := strings.Split(table, ".") - fmt.Printf("Preloading table: %s, field: %s, operator: %s, value: %s\n", table, field, operator, value) - if len(relations) > 3 { raiden.Fatal("unsupported nested relations more than 3 levels") } @@ -53,7 +51,6 @@ func (q *Query) Preload(table string, args ...string) *Query { raiden.Fatal("could not find related model.") } - fmt.Printf("Related model: %v\n", relatedModel) relatedModelStruct := reflect.TypeOf(relatedModel) if relatedModelStruct.Kind() == reflect.Ptr { relatedModelStruct = relatedModelStruct.Elem() @@ -127,9 +124,6 @@ func (q *Query) Preload(table string, args ...string) *Query { } } - fmt.Println("Relations: ", relationMap) - fmt.Println("Selects: ", selects) - fmt.Println("Prefix: ", relatedFieldPrefix) q.Relations = append(q.Relations, selects...) if field != "" && operator != "" && value != "" {