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
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