Another approach would be to have in-memory copies of the objects in  the
zodb (they could even be the same class, just without a database
connection).  Saving the file pushes the copy's data to the ZODB and
commits a transaction.  This would work with a single long running
connection or with short connections, opened just for save and load.

Many thanks for this reply.  Using copies of zodb objects should be
straightforward. Having only one short-lived connection open at a time would
probably keep things simplest.

I think the reverting use case needs a mechanism other than ZODB undo.

If at most one connection is ever open, a Leo-revert is just a pull from the
zodb, something like:

# Exception-handling omitted...
connection =
v = connection.root().get(fileName)
v2 = c.zodbTreeToLeoTree(v)

Edward K. Ream   email:  [EMAIL PROTECTED]

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -

Reply via email to