oid of newly-created object Was: [ZODB-Dev] Scalable Container
for Log-Entries
Steve Alexander
steve at z3u.com
Thu Jan 29 05:58:27 EST 2004
tdickenson at geminidataloggers.com
> On Thursday 29 January 2004 10:44, Thomas Guettler wrote:
> > Am Mittwoch, 28. Januar 2004 16:53 schrieb Steve Alexander:
> > > You may have problems if you want to get an oid for a newly-created
> > > object.
> >
> > Is there a way around this? How can I get a oid before the transaction
> > commits?
>
> Committing it in a subtransaction will assign it on oid.
Otherwise, Connection.add() should be backported from ZODB4 by the time
ZODB 3.3 comes out. Connection.add() asks for an object to be given an
oid at any point during a transaction.
--
Steve Alexander
More information about the ZODB-Dev
mailing list