This content has been marked as final.
Show 3 replies
-
1. Re: How can I map a VARCHAR db column to a byte[] using CMP?
aloubyansky Jul 17, 2004 4:33 AM (in response to lloyd)You could try to use http://www.jboss.org/wiki/Wiki.jsp?page=UserTypeMapping
-
2. Re: How can I map a VARCHAR db column to a byte[] using CMP?
lloyd Jul 19, 2004 4:53 AM (in response to lloyd)Hi,
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.
Thanks,
Lloyd. -
3. Re: How can I map a VARCHAR db column to a byte[] using CMP?
lloyd Jul 19, 2004 5:38 AM (in response to lloyd)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.
Cheers.