2 Replies Latest reply on Oct 11, 2004 11:31 AM by madalin

    table name is automatically changed from "user" to "xuser"

    madalin

      Env: CMP 4.0.0 with MySQL 4.0.12

      I want to create CMP bean (UserEJB) mapped to the USER table; (worked fine in 3.x).However, after I ported the application to JBoss 4.0, the table name is automatically changed to XUSER instead of USER, ignoring my settings from jbosscmp-jdbc.xml (I have the same problem with 2 other table names: "TRIGGER" and "VIEW", translated into "XTRIGGER" and "XVIEW")...

      Do you have any ideea why am I getting this? The jbosscmp-jdbc.xml file looks ok to me...

      Note: I am able to manually create a table named USER, so the db seems to be ok...

      Thank you,
      Dragos

      - jbosscmp-jdbc.xml
      ----------
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN"
      "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
      <jbosscmp-jdbc>

      java:/DefaultDS
      <datasource-mapping>mySQL</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <read-time-out>900</read-time-out>
      <pk-constraint>true</pk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-find
      </read-ahead>

      <enterprise-beans>

      <ejb-name>UserEJB</ejb-name>
      <table-name>USER</table-name>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      ......................................