On Apr 12, 2006, at 9:34 AM, Greg Monroe wrote:
You don't have to do it on each table (unless you want to),
just set the defaultIdMethod="native" attribute in the
database tag.
I think that this may also solve the ID_TABLE problem
because Torque may think it needs it for some tables and
still be doing some "accounting" and this is causing the
ID_TABLE to be incremented.
I second that.
Just a caveat, I recently had a problem with using "native" and got
rid of the idMethod tags entirely (so they default to none). I had
<database defaultIdMethod="native">
...
<table name="link_table">
<column name="fk1" type="INTEGER" required="true" primaryKey="true"/>
<column name="fk2" type="INTEGER" required="true" primaryKey="true"/>
<foreign-key foreignTable="table1">
<reference local="fk1" foreign="k1"/>
</foreign-key>
<foreign-key foreignTable="table2">
<reference local="fk2" foreign="k2"/>
</foreign-key>
</table>
...
</database>
which resulted in AUTO_INCREMENT being added to the sql for BOTH
columns fk1 and fk2, i.e. invalid SQL.
cheers,
h.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]