|
From: Randall R. <ra...@ra...> - 2003-09-06 08:59:05
|
Okay, so I got the current CVS, but transactions
still seem to not work. :)
>>> r = Person.new(firstName='my', lastName='lastname',
connection=trans)
>>> r.firstName = 'Bob'
>>> trans.commit()
>>> r.firstName = 'Billy'
>>> trans.rollback()
>>> print r.firstName
Billy
I thought that perhaps I needed to pull an object from
the db in order to use transactions with it, so
>>> del r
>>> q = Person(1, trans)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/site-packages/SQLObject/SQLObject.py", line
407, in __new__
val._init(id, connection, selectResults)
File "/usr/lib/python2.2/site-packages/SQLObject/SQLObject.py", line
665, in _init
selectResults = (connection or
self._connection)._SO_selectOne(self, dbNames)
AttributeError: 'Transaction' object has no attribute '_SO_selectOne'
Thoughts? :)
--
Randall Randall <ra...@ra...>
"You assist an evil system most effectively by obeying its orders and
decrees." -- Mahatma Gandhi
"When you advocate any government action, you must first believe that
violence is the best answer to the question at hand." -- Allen Thornton
|