-
Notifications
You must be signed in to change notification settings - Fork 62
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
Why int value in jsonb mapped to float ? #113
Comments
Is the field |
No, the params is a class Domain {
Map params
static mapping = {
params type: JsonbMapType
}
} And seems that Domain domain = new Domain()
domain.params = [orderId: 809]
domain.save() And in postgresql this column is : {"orderId": 890} But when I read it from domain ,the int value is float:
|
New discovery, I find sometimes int value saved to jsonb will convert to float. Here is my SQL:
But in fact all id should be int.
|
I second that. Very annoying, took me a while to track that down... |
It looks like a problem with GSON. Please see google/gson#1290 |
I use
5.2.0
in grails3.3.3
.Here is my jsonb velue in database:
But when I get from domain, I find it has been converted to float, why ?
The text was updated successfully, but these errors were encountered: