[ZODB-Dev] Ape newbie

Shane Hathaway shane at zope.com
Thu May 22 12:34:12 EDT 2003


Shane Hathaway wrote:
> I can see two options.  You can change testStoreAndLoad() so it modifies 
> the existing TestRoot and TestRoot2 objects rather than replace them. 
> This should be easy.  Or you can use a non-fixed classifier and 
> non-fixed persistent mapping.  A non-fixed classifier would assign a new 
> OID for each new object, allowing you to replace objects like you can in 
> normal ZODB.  Unfortunately, there isn't yet a general-purpose 
> classifier designed for use outside Zope.  (See apelib.zope2.classifier.)

Oops, this paragraph isn't quite right.  The serializer (a fixed 
persistent mapping) assigns the OIDs.  So you'd need to replace the 
serializer to get non-fixed OIDs.  But you'd still need to replace the 
classifier as well, since the classifier is responsible for telling Ape 
that an object does not yet exist.  FixedClassifier isn't smart enough 
to fulfill that contract unless you're also using fixed OIDs.

I hope that makes sense.

Shane




More information about the ZODB-Dev mailing list