File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
hibernate-reactive-core/src/main/java/org/hibernate/reactive/adaptor/impl Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,23 @@ public String getString(int columnIndex) {
83
83
84
84
@ Override
85
85
public boolean getBoolean (int columnIndex ) {
86
- Boolean bool = row .getBoolean ( columnIndex - 1 );
87
- wasNull = bool == null ;
88
- return !wasNull && bool ;
86
+ try {
87
+ Boolean bool = row .getBoolean ( columnIndex - 1 );
88
+ wasNull = bool == null ;
89
+ return !wasNull && bool ;
90
+ }
91
+ catch (ClassCastException cce ) {
92
+ // Oracle doesn't support an actual boolean/Boolean datatype.
93
+ // Oracle8iDialect in ORM registers the BOOLEAN type as a 'number( 1, 0 )'
94
+ // so we need to convert the int to a boolean
95
+ try {
96
+ return getInt ( columnIndex ) != 0 ;
97
+ }
98
+ catch (Exception e ) {
99
+ // ignore second exception and throw first cce
100
+ throw cce ;
101
+ }
102
+ }
89
103
}
90
104
91
105
@ Override
You can’t perform that action at this time.
0 commit comments