We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use protobuf generated struct as one of my model's field
type Element struct { bun.BaseModel `bun:"table:elements,alias:element"` ID string `bun:"id,nullzero,notnull,pk"` FlowID int `bun:"flow_id,nullzero,notnull,pk"` Revision int `bun:"revision,nullzero,notnull,pk"` Component string `bun:",nullzero"` Data *platform.GraphElement `bun:",nullzero,notnull,type:jsonb"` }
GraphElement consists of structured elements, which we use in some grpc responses as is.
During insert, I've caught the following panic message:
[bun] 23:00:02.390 ROLLBACK 9µs ROLLBACK *errors.errorString: driver: bad connection panic: reflect: call of reflect.Value.Field on ptr Value goroutine 269 [running]: reflect.Value.Field({0x105c49c20?, 0x14000b00df8?, 0x140008ce788?}, 0x80?) /opt/homebrew/Cellar/go/1.19.4/libexec/src/reflect/value.go:1266 +0xec github.com/uptrace/bun/schema.fieldByIndex({0x105c49c20?, 0x14000b00df8?, 0x140007f9cd8?}, {0x140002265f0?, 0x140007f9cd0?, 0x104e1de6c?}) /Users/tpoxa/go/pkg/mod/github.com/uptrace/bun@v1.1.10/schema/reflect.go:33 +0x44 github.com/uptrace/bun/schema.(*Field).ScanValue(0x140005bab00, {0x105c49c20?, 0x14000b00df8?, 0x9?}, {0x0, 0x0}) /Users/tpoxa/go/pkg/mod/github.com/uptrace/bun@v1.1.10/schema/field.go:114 +0x50 github.com/uptrace/bun.(*structTableModel).scanColumn(0x14000242a50, {0x14000823180, 0x9}, {0x0, 0x0}) /Users/tpoxa/go/pkg/mod/github.com/uptrace/bun@v1.1.10/model_table_struct.go:331 +0xe0 github.com/uptrace/bun.(*structTableModel).ScanColumn(0x14000242a50, {0x14000823180, 0x9}, {0x0?, 0x0?}) /Users/tpoxa/go/pkg/mod/github.com/uptrace/bun@v1.1.10/model_table_struct.go:311 +0x30 github.com/uptrace/bun.(*structTableModel).Scan(0x0?, {0x0?, 0x0?}) /Users/tpoxa/go/pkg/mod/github.com/uptrace/bun@v1.1.10/model_table_struct.go:307 +0x9c database/sql.convertAssignRows({0x105df51a0?, 0x14000242a50}, {0x0?, 0x0}, 0x14000af2980) /opt/homebrew/Cellar/go/1.19.4/libexec/src/database/sql/convert.go:385 +0x1f80
go version go1.19.4 darwin/arm64
Is this because of protoc-generated structs? Thanks.
The text was updated successfully, but these errors were encountered:
This is probabably fixed in v1.1.12
Sorry, something went wrong.
Indeed it is, thank you
No branches or pull requests
I use protobuf generated struct as one of my model's field
GraphElement consists of structured elements, which we use in some grpc responses as is.
During insert, I've caught the following panic message:
go version go1.19.4 darwin/arm64
Is this because of protoc-generated structs?
Thanks.
The text was updated successfully, but these errors were encountered: