SimpleFlatMapper
SimpleFlatMapper copied to clipboard
Question regarding Blob mapping
I have a table with 2 fields id & data. The data is of Blob. I'm trying to use Rowmapper to map the Blob to a byte[]
. How can this be achieved?
RowMapper<byte[]> rowMapper = JdbcTemplateMapperFactory .newInstance() .newRowMapper(byte[].class);
We are using this RowMapper with NamedParameterJdbcTemplate. The query which returns the Blob data looks like below:
SELECT data FROM table WHERE id = :id
Any help with this would be really appreciated.