db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gideon juve <j...@usc.edu>
Subject Autoincrement of primary key in MySQL
Date Fri, 16 May 2003 21:26:59 GMT
Hi all,

I just started using Torque the other day and I am having a little bit
of a problem. I can't figure out how to get the autoincrement fields of
my table object classes to synchronize with the database. For example, I
have a table called 'fault' that has an autoincremented primary key
called FaultID. I can do this:

fault f = new fault();

and it will put the default data in the database correctly, but when I
follow that with:


I get the default value for FaultID instead of the value that was
assigned by MySQL through autoincrement. I think that the problem has
something to do with how I have idMethod set in my schema, but I'm not sure.

Any help would be greatly appreciated.


View raw message