Ralf Grewe (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=70121%3...
) *commented* on HHH-16697 (
https://hibernate.atlassian.net/browse/HHH-16697?atlOrigin=eyJpIjoiOWE2YW...
)
Re: CALCULATED FIELDS in createNativeQuery doExtract integer insted of BigDecimals. (
https://hibernate.atlassian.net/browse/HHH-16697?atlOrigin=eyJpIjoiOWE2YW...
)
No, that’s not what I meant. I just described what kind of values are retured for Scale
and Precision in case you use aggregation functions (both will be zero). I’m not the
maintainer of the Hibernate Code but a quick look at method
“org.hibernate.dialect.OracleDialect.resolveSqlTypeDescriptor()” shows that case:
jdbcTypeCode = java.sql.Types.NUMERIC AND Scale = 0 AND Precision = 0
…is not properly handled. I will return type INTEGER (as you've mentioned) but it
should be BIGINTEGER.
So, yes, from my point of view this is a bug. You will pretty much always loose precision
in case of using aggregations functions.
Bye,
Ralf
(
https://hibernate.atlassian.net/browse/HHH-16697#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16697#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:3b7cdab )