XDoclet tags with JBoss

K

koslows

Hello,
I have a question about using XDoclet with CMP entity beans and JBoss.
I have problems with datatype mapping. As far as I understand the
standard mapping of type String is VARCHAR(50). Recently I had to
define another mapping (namely to MEDIUMTEXT, I'm using MySQL) , I
looked into the XDoclet documentation and I found out that the
jdbc-type tag exists in two versions. One as @jboss.jdbc.type with
parameter "type". And second as parameter "jdbc-type" of the
@ejb.persistence tag. The first seems for me to be ignored by the
XDoclet and the second works. My question is, how should I know when to
use which tag (or maybe I should use both of them?).

The second question I have is concerning the "jdbc-type" possible
values. In the documentation I've read that it has to be one of the
fields of java.sql.Types, and there, of course, I can't find the
MEDIUMTEXT type (which is I suppose mySQL specific). My solution is
that I use "BLOB" as "jdbc-type" and "MEDIUMTEXT" as "sql-type". Is it
the right solution (of course when I don't want my beans to be easily
transferable to other databases)?

thanx in advance for all advices

Karol Oslowski
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top