Re: [SQLObject] Patch: Transaction.commit(close=True) fails to synchronize deletes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2006-08-02 14:42:02
|
On Tue, Jul 18, 2006 at 10:43:59AM -0500, Luke Opperman wrote: > Index: dbconnection.py > =================================================================== > --- dbconnection.py (revision 1827) > +++ dbconnection.py (working copy) > @@ -837,8 +837,6 @@ > if self._dbConnection.debug: > self._dbConnection.printDebug(self._connection, '', 'COMMIT') > self._connection.commit() > - if close: > - self._makeObsolete() > subCaches = [(sub[0], sub[1].allIDs()) for sub in self.cache.allSubCachesByClassNames().items()] > subCaches.extend([(x[0], x[1]) for x in self._deletedCache.items()]) > for cls, ids in subCaches: > @@ -846,6 +844,8 @@ > inst = self._dbConnection.cache.tryGetByName(id, cls) > if inst is not None: > inst.expire() > + if close: > + self._makeObsolete() > > def rollback(self): > if self._obsolete: Applied and committed in the rev. 1840 to the trunk. Thank you! Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |