SimpleFlatMapper icon indicating copy to clipboard operation
SimpleFlatMapper copied to clipboard

Question regarding Blob mapping

Open shirishpandharikar opened this issue 2 years ago • 0 comments

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.

shirishpandharikar avatar Jun 08 '22 09:06 shirishpandharikar