First, the performance of BeanPropertyRowMapper is abysmal, as it says in the doc
it’s not made for that. This module offers performance very close to a manually written RowMapper - it could even be faster as
name access to a column is more expensive than by index.
Second SimpleFlatMapper support constructor injection, factory method, deep object etc…
Third, it also supports SqlParameterSource, and Crud operations.
You might also have a look at Spring-JDBC-ROMA that also creates
RowMapper.
Also sfm supports one-to-many mapping using the ResultSetExtractor or the PreparedStatementCallback.
From 7.0.0 you will need explicitly include the spring-jdbc dependency in your pom.
RowMapper
SqlParameterSource
java.sql.Types
Because the parameter source does not have any metadata, the java.sql.Types will be extrapolated from the object property type.
If the sql type implied is not the one desired, you can specify one manually by adding a SqlTypeColumnProperty.
For example when using a non jdbc 4.2 compliant driver with a ZonedDateTime.
Sfm will use a TIMESTAMP_WITH_TIMEZONE which may is not supported by the driver.
The following code will override the type with Types.TIMESTAMP :
Just make sure that you are using the column name not the property name.