[jboss-user] [EJB 3.0] - Re: How to set default mapping to TEXT instead of VARCHAR(25
tigrou
do-not-reply at jboss.com
Fri Aug 11 08:57:04 EDT 2006
I have the same problem (I have to store a VARCHAR(5000) on MySQL 4 (witch as WARCHAR limited to 255)).
I'm not sure it will work but I have found that the mapping file is in :
$JBOSS_HOME\serveur\default\conf\standardjbosscmp-jdbc.xml
You have the mapping for each type of Bdd.
For my case, I have change the
<type-mapping>
| <name>mySQL</name>
| ...
| <mapping>
| <java-type>java.lang.String</java-type>
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>VARCHAR(250) BINARY</sql-type>
| </mapping>
| </type-mapping>
by :
<type-mapping>
| <name>mySQL</name>
| ...
| <mapping>
| <java-type>java.lang.String</java-type>
| <jdbc-type>VARCHAR</jdbc-type>
| <sql-type>TEXT</sql-type>
| </mapping>
| </type-mapping>
It seams to work fine after a Jboss reboot.
Dont forget to select your database type in your xxx-ds.xml file
<metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964603#3964603
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964603
More information about the jboss-user
mailing list