I'm trying to use transactions to manage a sequence of insert/update statements, and I'm getting foreign key constraint violations on the later insert statements. The sequence is something like this (excuse any syntactical errors, as I'm not copying and pasting):
Transaction trans = new Transaction(); Connection conn = trans.begin(dbName); User = new User(); // set user attributes... user.save(conn); UserInfo userInfo = new UserInfo(); // set user info attributes user.addUserInfo(userInfo); user.save(conn); There is a foreign key constraint which links user_info.user_id to user.user_id. I was under the impression that as long as I used the same connection for these sequential update statements, I could get away with the code above. Clearly this is not the case, however, as I'm getting a TorqueException (unique constraint violation at the second user.save() call). Is there a workaround for this? Thanks. -rob --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
