You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Chris Huisman <ch...@chenomx.com> on 2003/09/03 17:30:37 UTC
MySQL autoincrement not working
Hello,
I have just upgraded to version 3.1, and in updating my schema per:
TRQS178: use sql autoincrement only if idMethod native. So you
have to set idMethod="native" (table) plus autoincrement="true"
(column) to generate the autoincrement code in your sql.
my tables primary keys are not longer being autoincremented.
The following is an example table:
<table name="USER" description="A collection of all users"
idMethod="native">
<column name="USER_ID" primaryKey="true" required="true"
type="INTEGER" autoincrement="true"/>
<column name="EMAIL_ADDRESS" required="true" size="30"
type="VARCHAR"/>
<column name="PASSWORD" required="true" size="12" type="VARCHAR"/>
<column name="PERMISSIONS" required="true" size="12"
type="VARCHAR"/>
<unique>
<unique-column name="EMAIL_ADDRESS"/>
</unique>
</table>
What am I doing wrong?
chris.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org