I don't think this will work. The example is still basically mapping an Integer to a column in the database. I want to map a byte to a VARCHAR column in the database. I can do it using simple SQL by doing something like preparedStatement.setBytes(1,myBytes) but I can't find out how to do this using CMP in JBoss.
I can't convert to a String as the data is encrypted - it has to be a byte array.
Any other suggestions greatly appreciared.
Oops! I've just spotted the problem. I'd missed out the @jboss.sql-type Xdoclet tag, so my jdbc-type and sql-type tags weren't being created in the jbosscmp-jdbc.xml file.
It all works fine now.