Open eduardhasanaj opened 4 years ago
Could you post a code same that I could use to reproduce this? The panic on line 43 is ostensibly because the recover is nil, which is likely due to the generated code. I’m not familiar with sqlboiler.
I am sorry for not providing the code.
type Option struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"id"`
OptionlistID null.Int `boil:"optionlist_id" json:"optionlist_id,omitempty" toml:"optionlist_id" yaml:"optionlist_id,omitempty"`
Description null.String `boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"`
Price types.NullDecimal `boil:"price" json:"price,omitempty" toml:"price" yaml:"price,omitempty"`
R *optionR `boil:"-" json:"-" toml:"-" yaml:"-"`
L optionL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
If I invoke scan on the Price before decoding I do not get the error. The problem is that I need this to decode an array
Hm. Sounds similar to https://github.com/volatiletech/sqlboiler/issues/404. Perhaps I should revisit that issue.
I've corrected this as ericlagergren suggested in his PR to sqlboiler. Will be in the dev branch for now and included in a later release.
Hi @aarondl , do we have an update about this issue? If this is already fixed, do we know already when it will be merged?
@jbactad Hi, Currently I am using dev branch for this problem.
@jbactad As far as I'm concerned this is fixed already in master v3.6.0
Hi, I am seeing and error from this lib at this line github.com/ericlagergren/decimal@v0.0.0-20190912144844-2c3e3e1ef942/scan.go:43 +0x9e The error occurred when using json decoder on a model generated by sqlboiler.