-
Notifications
You must be signed in to change notification settings - Fork 129
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
Problem Mapping Long fields #410
Comments
Hi @claudio-au, thanks for using our client. Your issue is caused by using Try to use your query without
It will be good improvement... Is this something you might be willing to help with? Regards |
Alright @bednar , thanks for checking it. Do you want I close this issue? |
I've prepared the fix in #414... so we can keep this issue opened until acceptance the PR |
When It is mapped a Long (Not primitive) field on model class and we use pivot function to return the values for each field on model, a Cast exception is thrown during the execution.
It says is not possible cast Long to Double.
When we use long (primitive) it doesn't throw error, however it returns zero (not behavior expected).
Steps to reproduce:
ModelInflux.java
Main.java
Main.java
Expected Behavior:
Return the model without error and value available.
Actual Behavior:
Error:
Caused by: com.influxdb.exceptions.InfluxException: Can not set java.lang.Long field com.autonomic.test.domain.ModelInflux2.field1 to java.lang.Double
Specifications:
PS.: I see this code is converting only to primitives. (Maybe include more options to conversion?)
influxdb-client-java/client-core/src/main/java/com/influxdb/query/internal/FluxResultMapper.java
Lines 132 to 144 in f9f6aa0
The text was updated successfully, but these errors were encountered: