-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
When generate model using goctl, the numeric type is treated as a bigint #4435
Comments
I have reproduced it here and it can be generated normally. Please make sure your goctl version is greater than or equal to 1.6.5 |
I've been able to reproduce this issue steadily in the latest 1.7.5 release. |
@smokecat hello, I have tryied and seems it still cannot recognize numeric datatype in postgresql, it was generated to int64 rather than custom type(mine is big.Int)
goctl.yaml
goctl version 1.7.5 |
Yes, I think this should be unexpected. The expectation should be to recognize the 'numeric' data type. In your example, the result should be generated to big.Int |
Describe the bug
A field of type
numeric
in the PostgreSQL database is generated asint64
. And thenumeric
database type is treated as abigint
type ingoctl.yaml
To Reproduce
The sql is
The genereated model struct is
The
goctl.yaml
isExpected behavior
The type of MaxPosition is
decimal.Decimal
Environments (please complete the following information):
The text was updated successfully, but these errors were encountered: