I'm using Eclipse for JBoss development. I've configured MySQL for JBoss, and I'm able to use it for simple CMP beans where the table exists. However, when I want JBoss to create the tables, I'm having problems.
I'm using the @ejb.persistence tag for my CMP fields, and I'm using the jdbc-type and sql-type attributes.
/** * @ejb.persistence * column-name = "name" * jdbc-type="VARCHAR" * sql-type="varchar(64)" * @ejb.interface-method * @ejb.value-object match = "simple" */ public abstract String getName();
<cmp-field> <field-name>name</field-name> <column-name>name</column-name> <jdbc-type>CHAR</jdbc-type> <sql-type>varchar(64)</sql-type> </cmp-field>
from the sql generated
Executing SQL: CREATE TABLE Workgroup (id VARCHAR(256) NOT NULL, name VARCHAR(256), CONSTRAINT pk_Workgroup PRIMARY KEY (id))
the error states that VARCHAR max length should only be 255.
hth