Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-16650 (
https://hibernate.atlassian.net/browse/HHH-16650?atlOrigin=eyJpIjoiOGUxY2...
)
Re: Loss in precision due usage of Float data type instead of BigDecimal in case Oracle
JDBC driver returning -127 for scale and 0 for precision if precision/scale is unknown.
Might happen unexpectedly and requires very close inspection of used SQL (
https://hibernate.atlassian.net/browse/HHH-16650?atlOrigin=eyJpIjoiOGUxY2...
)
So that was a decent rant, but what it didn’t include was the actual information required
to reproduce this.
I tried this quickly:
create table p (
id number (19,0) not null ,
email varchar2 (255 char ) not null ,
thenumber number (38,0),
primary key (id)
)
s.createNativeQuery( "select id, thenumber from p" ).getSingleResult()
And I got back a BigDecimal. Same thing with number(38,5). Same thing with number(19,5).
Same for number(10,5). With number(19) I get a Long.
So this bug does not appear to affect my version of Oracle and its JDBC driver.
But then, I don’t actually know what you did.
(
https://hibernate.atlassian.net/browse/HHH-16650#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16650#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:9dd72a2 )