// if we are here, it wasn't a boolean or null, so try to grab a string instead
finalStringbool=rs.getString(index);//.toUpperCase(); // do we want it case-insensitive?
finalbooleanret=YES.equals(bool);
if(!ret&&!NO.equals(bool))
thrownewSQLException(String.format("Implicit conversion of database string to boolean failed on column '%d'. Returned string needs to be '%s' or '%s' and was instead '%s'.",index,YES,NO,bool));
finalbooleanret=TRUE.equals(bool);
if(!ret&&!FALSE.equals(bool))
thrownewSQLException(String.format("Implicit conversion of database string to boolean failed on column '%d'. Returned string needs to be '%s' or '%s' and was instead '%s'.",index,TRUE,FALSE,bool));
thrownewSQLException(String.format("Implicit conversion of database string to boolean failed on column '%d'. Returned string needs to be '%s' or '%s' and was instead 'null'. If you want to accept null values, make it an object Boolean instead of primitive boolean.",index,YES,NO));
thrownewSQLException(String.format("Implicit conversion of database string to boolean failed on column '%d'. Returned string needs to be '%s' or '%s' and was instead 'null'. If you want to accept null values, make it an object Boolean instead of primitive boolean.",index,TRUE,FALSE));
@ -670,7 +670,7 @@ public class RowToObjectMapper<K, T> extends AbstractRowMapper<K, T> {
}catch(SQLExceptione){
// if we are here, it wasn't a boolean or null, so try to grab a string instead
Stringbool=_resultSet.getString(index);//.toUpperCase(); // do we want it case-insensitive?
ret=YES.equals(bool);
ret=YES.equals(bool);// todo: how do we handle null here? looks to be different than ResultSetUtil.java
if(!ret&&!NO.equals(bool))
thrownewMapperException(String.format("Implicit conversion of database string to boolean failed on column '%d'. Returned string needs to be 'Y' or 'N' and was instead '%s'.",index,bool));