Robert Gravina wrote at 2007-4-1 00:31 +0900: > ... >Woohoo! I realised Connection.sync() does exactly what I need, but >this still doesn't work as expected. > >class UpdatedDB(DB): > def invalidate(self, tid, oids, connection=None, version=''): > DB.invalidate(self, tid, oids, connection, version) > if connection is not None: > connection.sync() > >Am I going about this the right way?
Recently, Chris Withers reported a strange "AssertionError" after a call of "loadBefore". The following discussion lead to the conclusion that the current ZODB code (its MVCC part) may not allow to call "invalidate" when the objects was not modified. If, on the other hand, the object was modified, "invalidate" is called automatically. No need to do it yourself. Furthermore, be aware that "Connection.sync" aborts the current transaction. -- Dieter _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org http://mail.zope.org/mailman/listinfo/zodb-dev