Skip to content

v1.2.10: looks like some fields are embedded differently / incorrectly #1136

@vmihailenco

Description

@vmihailenco

@j2gg0s just upgraded to v1.2.10 and something is broken or changed in backwards incompatible way. I am tempted to blame b410e42

The bug manifests as if the field type is detected incorrectly:

panic: reflect: call of reflect.Value.SetUint on string Value
goroutine 257 [running]:
panic({0x1bccd20?, 0x4000ccacc0?})
        runtime/panic.go:787 +0xf8
reflect.Value.SetUint({0x1b01560?, 0x4000ac5018?, 0x400174a4e8?}, 0x1)
        reflect/value.go:2184 +0x100
github.com/uptrace/bun/schema.scanUint64({0x1b01560?, 0x4000ac5018?, 0x1f347e0?}, {0x1b01720?, 0x2cb9fc8?})
        github.com/uptrace/bun@v1.2.10/schema/scan.go:196 +0x9c
github.com/uptrace/bun/schema.(*Field).ScanWithCheck(0x1d397c0?, {0x1b01560?, 0x4000ac5018?, 0x4000f4a408?}, {0x1b01720?, 0x2cb9fc8?})
        github.com/uptrace/bun@v1.2.10/schema/field.go:132 +0x90

For now I've rolled back to #1127 and all is back to normal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions