db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helge Weissig <hel...@grajagan.org>
Subject Re: Torque id broker
Date Wed, 12 Apr 2006 16:48:20 GMT
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 foreignTable="table2">
		<reference local="fk2" foreign="k2"/>

which resulted in AUTO_INCREMENT being added to the sql for BOTH  
columns fk1 and fk2, i.e. invalid SQL.


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message