Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYjQzZjU5OWQ1...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiYjQzZj...
) HHH-15549 (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiYjQzZj...
) incorrect DDL mapping DECIMAL -> BOOLEAN on Oracle (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiYjQzZj...
)
Change By: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
I just stumbled on this buried treasure in {{OracleDialect}}:
{code:java} case Types.DECIMAL:
if ( scale == 0 ) {
switch ( precision ) {
case 1:
return jdbcTypeRegistry.getDescriptor( Types.BOOLEAN );{code}
Of course, {{precision==1}} means one _decimal_ digit of precision, not one bit.
Now UPDATE: So , _just by pure luck OK , _ this doesn’t break anything because in Oracle
pre-23c is for reverse engineering I guess , we map {{BOOLEAN}} but it still seems pretty
wrong to assume that every {{ number NUMBER (1,0)}} , but by the same token that whole
block of code looks just completely pointless is a boolean value and not a one digit
decimal.
I believe it should be deleted.
(
https://hibernate.atlassian.net/browse/HHH-15549#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15549#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#100207- sha1:1c92a42 )