Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using time.Time fields results panic #22

Open
AlexanderMatveev opened this issue Oct 4, 2023 · 1 comment
Open

Using time.Time fields results panic #22

AlexanderMatveev opened this issue Oct 4, 2023 · 1 comment

Comments

@AlexanderMatveev
Copy link

panic: reflect: call of reflect.Value.Type on zero Value

goroutine 1 [running]:
reflect.Value.typeSlow({0x0?, 0x0?, 0x1400021e5b8?})
        /usr/local/go/src/reflect/value.go:2634 +0x134
reflect.Value.Type(...)
        /usr/local/go/src/reflect/value.go:2629
github.com/golobby/orm.(*binder).makeNewPointersOf(0x1400021f2d8, {0x140001461c0?, 0x1400013a0c0?, 0x3?})
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/binder.go:16 +0xa0
github.com/golobby/orm.(*binder).makeNewPointersOf(0x1400021f2d8, {0x1027d3040?, 0x1400013a0b0?, 0x4?})
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/binder.go:24 +0x3c0
github.com/golobby/orm.(*binder).makeNewPointersOf(0x1400021f2d8, {0x1027bda80?, 0x1400013a070?, 0x10230164c?})
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/binder.go:24 +0x3c0
github.com/golobby/orm.(*binder).ptrsFor(0x1400013c090?, {0x1027bda80?, 0x1400013a070?, 0x1022fb534?}, {0x14000146000, 0x8, 0x102751f40?})
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/binder.go:48 +0x30
github.com/golobby/orm.(*binder).bind(0x140003382a0?, 0x1400042c040?, {0x10276b2a0, 0x1400013a070})
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/binder.go:114 +0x1d0
github.com/golobby/orm.(*QueryBuilder[...]).Get(0x1027e2880)
        /Users/alex/go/pkg/mod/github.com/golobby/[email protected]/query.go:78 +0xcc

I noticed that orm.Schematic() shows extra fields look related to time.Time and not exist in my structs:
Снимок экрана 2023-10-04 в 15 14 48
Снимок экрана 2023-10-04 в 15 12 22

@AlexanderMatveev
Copy link
Author

Снимок экрана 2023-10-04 в 15 26 47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant