Hi,
this might be a really stupid question since I'm new to
java EE. I'm trying to make a database table with entity bean: CREATE TABLE XXX { ID int not null auto-increment primary key, name varchar(255)};
So i have declared with xdoclet
* @ejb.pk-field
* @ejb.persistent-field column-name="ID"
* @ejb.interface-method view-type="local"
* @jboss.persistence auto-increment = "true"
* not-null = "true"
In ejb-jar the ID field has been declared primary key.
In jbosscmp-jdbc.xml the ID cmp field have been declared "not-null" and "auto-increment".
I'm using mySQL with I have changed in standardjbosscmp-jdbc.xml and I have declared
* @jboss.entity-command name="mysql-get-generated-keys"
In the entity bean
BUT still after deployment... when I type "show create table XXX" in my MySQL shell.... neither "not null" nor "auto-increment" is declared!
Any suggestions of what can be wrong?
Everything works fine if i manually create the SQL-table with "not null" and "auto-increment". Its really confusing.