Skip to content

How to use it in gorm? #61

@codeinet

Description

@codeinet
type test struct {
    Id nullable.Uint64
}
defaultValue := uint64(0)
nullableValue := nullable.NewUint64(&defaultValue)
db.Model(&test).Select("id").Pluck("id", &nullableValue)

I can see that the first is used to get the value with the model in the gorm. test code
However, it does not seem to work in the above situation.
How should I use it in gorm?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions