Stefan Mitzkus (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a27b49...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZDY0ZTk0OTE0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16455?atlOrigin=eyJpIjoiZDY0ZT...
) HHH-16455 (
https://hibernate.atlassian.net/browse/HHH-16455?atlOrigin=eyJpIjoiZDY0ZT...
) calling oracle function returns Integer instead of BigDecimal (
https://hibernate.atlassian.net/browse/HHH-16455?atlOrigin=eyJpIjoiZDY0ZT...
)
Change By: Stefan Mitzkus (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5a27b49...
)
Calling the following oracle function with Hibernate 6.1.7 returns an BigInteger of value
1.23:
{code:java}
create or replace Function "HIBERNATE_TEST"
RETURN NUMBER is
d_RET DECIMAL(5,2);
BEGIN
d_RET := 1.23;
return d_RET;
END;
{code}
The function is called as follows:
{code:java}
public BigDecimal hibernateTest() {
Object result = entityManager
.createNativeQuery(
"SELECT HIBERNATE_TEST() FROM DUAL")
.getSingleResult();
return (BigDecimal) result; // 1.23
}
{code}
Calling the same function with the same code as above with Hibernate 6.2.0 returns an
Integer of value 1 which causes an ClassCastException.
(
https://hibernate.atlassian.net/browse/HHH-16455#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16455#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#100221- sha1:9ff53d8 )