I'm using the Spring JDBC version of SFM 8.2.3 and I'm having the following issues with inserting rows containing UUIDs that need to be converted to binary(16). I figured out how to fix the reads with a getter but the writes/inserts have been tricky to figure out. I resorted to manual queries but would really like to use the crud and auto-mapping functionality of this library.
Do I need to have a custom setter to handle this write conversion?
I'm using the Spring JDBC version of SFM 8.2.3 and I'm having the following issues with inserting rows containing UUIDs that need to be converted to binary(16). I figured out how to fix the reads with a getter but the writes/inserts have been tricky to figure out. I resorted to manual queries but would really like to use the crud and auto-mapping functionality of this library.
Do I need to have a custom setter to handle this write conversion?
Thanks in advance.
JdbcTemplateCrud<T, K> crudDao = JdbcTemplateMapperFactory .newInstance() .addKeys("id") .addGetterForType( UUID.class, (rs, uuidColIndex) -> { return UUIDUtils.getUUIDFromByteArray(rs.getBytes(uuidColIndex)); }) .crud(entityType, keyType) .to(namedParamJdbcTemplate.getJdbcTemplate(), table);