Yep that was it... , how did you know? On Mon, May 17, 2010 at 2:22 PM, Garry Freemyer <garry...@pacbell.net> wrote: > Two guesses. > 1. Is the underlying database mysql? If so the transaction stuff only works > if the table(s) it is working on are of type InnoDb > 2. Truncate table cannot be rolled back, perhaps the presence of the > truncate table command is causing the transaction to be ignored. > If the tables are innodb type, try moving the truncate test command to just > above the beginTransaction and see what that does. > ________________________________ > From: Richard U <richard....@gmail.com> > To: symfony-users@googlegroups.com > Sent: Sun, May 16, 2010 8:57:38 PM > Subject: [symfony-users] Hey guys... transactions?? > > Hey guys... based on my understand about transactions in symfony the > following should not result in the data in the table been modified... > however it is... any ideas as to what i am doing wrong...?? > > $cdb_connection = Propel::getConnection('cdb'); > $cdb_connection->beginTransaction(); > $statement_cdb = $cdb_connection->prepare("TRUNCATE test"); > $statement_cdb->execute(); > $statement_cdb = $cdb_connection->prepare("INSERT INTO test (a) > VALUES (".rand(0,99999).")"); > $statement_cdb->execute(); > $cdb_connection->rollback(); > die(__file__.__line__); > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en >
-- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en