[ZODB-Dev] zodb4: adding an object before transaction commit

Roché Compaan roche at upfrontsystems.co.za
Tue Oct 7 03:38:12 EDT 2003


* John Belmonte <jvb at prairienet.org> [2003-10-06 19:37]:
> Steve Alexander wrote:
> >I want to do some things with the oids of persistent objects, such as 
> >use them as keys in a BTree.
> >
> >The thing is that an object doesn't get an oid until it is added to the 
> >database, and a transaction is committed.
> 
> Hello,
> 
> I'm wondering if your need can be addressed by the "ID generator" patch 
> posted by Roché Compaan (see 
> http://mail.zope.org/pipermail/zodb-dev/2003-August/005690.html).  I 
> think it is a more general solution.
> 
> I would like to see some form of Roché's idea put into ZODB proper, and 
> would be willing to help with the maintenance, documentation, and testing.

FYI, that patch has 2 issues - first, counters are not persisted so they
get lost after a restart and second, TmpStore is not patched. But at
least it shows the idea.

If anyone is interested I made a small FileStorage123 package with the
id generator functionality that doesn't patch any ZODB code - I only
subclass and extend File-, Server- and ClienStorage.

-- 
Roché Compaan
Upfront Systems                 http://www.upfrontsystems.co.za



More information about the ZODB-Dev mailing list