Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Java boolean is not handled correctly when used with Oracle JDBC driver [SPR-14116] #18688
Database field is defined as NUMBER(1,0).
In version 3.2.2.RELEASE StatementCreationUtils.javaTypeToSqlTypeMap had no mapping for java boolean (more precisely it was commented out) and was working fine. This resulted in StatementCreationUtils.setValue() to execute ps.setObject(paramIndex, inValue).
After boolean mapping was uncommented ps.setObject(paramIndex, inValue, sqlType) is used.
Oracle doesn't have proper matching boolean type, however driver is smart enough to do automatic conversion from boolean to NUMBER.
Therefore following statements are valid:
What is currently done:
Which fails with invalid column type 17004.