Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZWYyYWY5MmM4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiZWYyYW...
) HHH-15549 (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiZWYyYW...
) incorrect DDL mapping DECIMAL -> BOOLEAN on Oracle (
https://hibernate.atlassian.net/browse/HHH-15549?atlOrigin=eyJpIjoiZWYyYW...
)
Issue Type: Bug Affects Versions: 6.1.3 Assignee: Unassigned Created: 26/Sep/2022 04:43 AM
Priority: Major Reporter: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
I just stumbled on this buried treasure in OracleDialect :
case Types.DECIMAL:
if ( scale == 0 ) {
switch ( precision ) {
case 1:
return jdbcTypeRegistry.getDescriptor( Types.BOOLEAN );
Of course, precision==1 means one decimal digit of precision, not one bit.
Now, just by pure luck, this doesn’t break anything because in Oracle pre-23c, we map
BOOLEAN to number(1,0) , but by the same token that whole block of code looks just
completely pointless.
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 )