@ -78,6 +79,9 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
@@ -78,6 +79,9 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
/** Whether we're strictly validating */
privatebooleancheckFullyPopulated=false;
/** Whether we're defaulting primitives when mapping a null value */
@ -199,6 +203,22 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
@@ -199,6 +203,22 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
@ -229,11 +249,13 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
@@ -229,11 +249,13 @@ public class BeanPropertyRowMapper<T> implements RowMapper<T> {
bw.setPropertyValue(pd.getName(),value);
}
catch(TypeMismatchExceptione){
logger.warn("Intercepted TypeMismatchException for row "+rowNumber+
if(value==null&&primitivesDefaultedForNullValue){
logger.debug("Intercepted TypeMismatchException for row "+rowNumber+
" and column '"+column+"' with value "+value+
" when setting property '"+pd.getName()+"' of type "+pd.getPropertyType()+
*tryusingcolumnaliasesintheSQLstatementlike"select fname as first_name from customer".
*
@ -55,8 +59,19 @@ public class ParameterizedBeanPropertyRowMapper<T> extends BeanPropertyRowMapper
@@ -55,8 +59,19 @@ public class ParameterizedBeanPropertyRowMapper<T> extends BeanPropertyRowMapper
@ -89,4 +90,22 @@ public class BeanPropertyRowMapperTests extends AbstractRowMapperTests {
@@ -89,4 +90,22 @@ public class BeanPropertyRowMapperTests extends AbstractRowMapperTests {