On 6/6/07 9:28 PM, Neal Clark wrote: > so, it this key constraint is being violated because the dropsite > that was just ->save'd, which would have had an id of 19, was in fact > not inserted. Yet it does increment my dropsites_id_seq, because > overtime i run this the row that "is not present in table > 'dropsites'" goes up by one.
When RDBO saves an object with a serial column into a Postgres database, it pre-fetches the serial value by getting the next value in the sequence, then it passes that as the value of the serial column in the insert statement. I suspect that's what's throwing off your triggers. Now that you know what's happening, presumably you can account for it somehow in your triggers. If not, you can make the serial column an integer column in your RDBO class metadata to avoid the pre-fetching of the sequence value. -John ------------------------------------------------------------------------- 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