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 Brandon Mayes <ef...@hotmail.com> on 2005/03/01 16:43:58 UTC

auto-increment is messed up

So I noticed that by using MySQL, the auto-increment property was never set. 
  In the MySQL driver it said that since the ID field was not read-only that 
in order to conform to the standard, it must return false indefinitely.  
Hence, there was never an auto-increment when creating XML from a JDBC 
connection.  Now I have switched to Cloudscape.  I'm not sure if the driver 
is different or not, but I have set auto-increment in the table, and it 
should take care of it whenever an element (row) is inserted into the 
database.  Using the torque:jdbc command I can connect to an existing DB and 
generate everything perfectly, except I get one error in one java file.  I 
have a patient DB that includes patient_id, firstName, lastName, address, 
etc. and here's how it starts the BasePatient class:

public abstract class BasePatient extends BaseObject
{
    /** The Peer class */
    private static final PatientPeer peer =
        new PatientPeer();


    /** The value for the patientId field */
    private Integer patientId = new Integer(AUTOINCREMENT: start 1 increment 
1);


The Java code doesn't compile since that "AUTOINCREMENT: start 1 increment 
1" statement is not a valid argument to pass to an Integer object.  Has 
anyone seen this before or do you know why this is doing this?

-Brandon

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to 
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


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