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.
> def invalidate(self, tid, oids, connection=None, version=''):
> DB.invalidate(self, tid, oids, connection, version)
> if connection is not None:
>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.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org