This seems like an odd solution. The result of the converter is a byte. That byte is being converted properly to MySQL BINARY. Wouldn't it be better to allow that to happen directly without having to wrap the byte?
Also, this solution only partially works. I believe there is a bug preventing this solution from working when there are One to Many relationships. Here is a link to that bug: DATAJDBC-326 I'm ultimately trying to get UUIDs to work within Spring Data JDBC
Wrapping a byte array just to then extract the byte array is an odd solution.
I'm not saying that we don't want to improve on that, but it is what currently works (modulo the bug you mentioned) and I'm not inclined to create some kind of specialized solution for byte, let alone byte for MySql.
Currently, I'm thinking more about extending the conversion infrastructure to specify as what kind of JDBCType a value should get stored. This is ticket DATAJDBC-239.
Apart from not liking specialized solutions I kind of doubt that a byte has its place in a domain model if it is to represent binary data.
A proper domain object, for example, a UUID is the better solution in this case.
So what is left for now is fixing DATAJDBC-326 which is high on my list of priorities
I agree that you shouldn't develop specialized solutions. Naively it seems like byte should be supported without a specialized solution. But if it can't then I agree it isn't worth it. Furthermore, if you fix DATAJDBC-326 then I will be more than satisfied. Thank you for working on that bug! Do you have any sense of when it will be solved?