Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyglazyrindev committed Nov 21, 2021
1 parent b41ec65 commit eeaca46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/gorm_persistence_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"database/sql"
"errors"
"fmt"
"github.com/davecgh/go-spew/spew"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"net/url"
Expand Down Expand Up @@ -674,6 +675,7 @@ func (afo *GormAdminFilterObjects) FilterQs(filterString string) {

func (afo *GormAdminFilterObjects) Search(field *Field, searchString string) {
fieldType := field.FieldType.Kind()
spew.Dump(field.Name, fieldType)
if fieldType == reflect.Ptr {
fieldType = field.FieldType.Elem().Kind()
}
Expand Down Expand Up @@ -721,6 +723,7 @@ func (afo *GormAdminFilterObjects) Search(field *Field, searchString string) {
paginatedGormOperatorContext := NewGormOperatorContext(afo.GetPaginatedQuerySet(), model1)
for searchField := range adminPage.SearchFields.GetAll() {
fieldType1 := searchField.Field.FieldType.Kind()
spew.Dump(searchField.Field.Name, fieldType1)
if searchField.Field.FieldType.Kind() == reflect.Struct {
afo.Search(searchField.Field, searchString)
continue
Expand Down

0 comments on commit eeaca46

Please sign in to comment.