On 6/7/07, Neal Clark <[EMAIL PROTECTED]> wrote: > Thank you for the prompt reply. I am not entirely sure I understood > it, and I probably didn't give the right details when I mailed the > list earlier today. If I change my id column from serial to integer > it will not, to put it in mysql terms, auto_increment.
I think what John meant was mark the column as an integer in your Rose::DB class, but leave it as a serial in the database. > Also, I do not > understand why Rose::DB goes to the trouble of getting tangled up in > the serial sequence when a value 'DEFAULT' for the id to the > statement handler would do the same thing. Usually this is done so that the code knows exactly what the primary key for the row is going to be. If you just insert using DEFAULT, then you usually have to make an extra call to the DB to retrieve the record again to find out what id was assigned to the row (some DBD modules provide the last insert ID, but I don't think it is very consistent across databases). Cheers, Cees Hek ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object