Search code examples
spring-data-jdbc

Support for mapping of byte[]


Our entity contains the field byte[] fileContent.

Does not seem like spring-data-jdbc is saving it in DB; actually only 1 byte is persisted, and not the whole array.

Is there a way to persist binary content using Spring Data JDBC? Thanks


Solution

  • Right now there isn't. But it will be possible using byte[] in the not to far future. See https://jira.spring.io/browse/DATAJDBC-327 and https://jira.spring.io/browse/DATAJDBC-332