From: Jaime W. <pro...@gm...> - 2007-10-22 12:59:36
|
Hi all. Can anyone tell me why the code below commits rows to the table? I've read the documentation and I'm not quite sure why it is happening. # BEGIN CODE SNIPPET from sqlobject import * conn = connectionForURI('mysql://user:pass@localhost/test?debug=1') class TestTable(SQLObject): _connection = conn col1 = StringCol() col2 = StringCol() TestTable.createTable(ifNotExists = True) trans = conn.transaction() t = TestTable(col1 = 'col1', col2 = 'col2') trans.rollback() # END CODE SNIPPET The console output is below. I expected to see a `BEGIN` or `START TRANSACTION` somewhere at the beginning of the output, but it is not there. Is this a bug, or user error :) ? 1/Query : DESCRIBE test_table 2/QueryIns: INSERT INTO test_table (col2, col1) VALUES ('col2', 'col1') 2/QueryOne: SELECT col1, col2 FROM test_table WHERE ((test_table.id) = (3)) 1/ROLLBACK: Thanks! jw -- "Government does not solve problems; it subsidizes them." Ronald Reagan |