db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Mayes" <eff4...@hotmail.com>
Subject auto-increment is messed up
Date Tue, 01 Mar 2005 15:43:58 GMT
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 

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?


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

View raw message