You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we have StringToEnumConverter and IntegerToEnumConverter in shared DefaultConversionService, BeanPropertyRowMapper supports Enum now, but there is a little problem with jdbc 4.1 rs.getObject(index,type), if type is Enum it will always return null, actually we need String or Integer here, use rs.getObject(index) is fine.
I've rolled a slightly more extensive change into JdbcUtils.getResultSetValue: We check for an enum target type but manually call rs.getObject then, evaluating the outcome to a String or number, and enforcing rs.getString for anything else. Otherwise we'd fail to handle enums on Postgres where rs.getObject returns a PGObject for an enum column.
Yanming Zhou opened SPR-14990 and commented
Since we have StringToEnumConverter and IntegerToEnumConverter in shared DefaultConversionService, BeanPropertyRowMapper supports Enum now, but there is a little problem with jdbc 4.1 rs.getObject(index,type), if type is Enum it will always return null, actually we need String or Integer here, use rs.getObject(index) is fine.
Affects: 4.3.4
Reference URL: #1259
Issue Links:
Referenced from: commits 278a625, 4e41f74
The text was updated successfully, but these errors were encountered: