[ZODB-Dev] Persistent Mapping Classes

Ron Wills ron at rwsoft.ca
Thu Oct 20 20:02:13 EDT 2005


Hello All

 I hope this is the right place to ask about this... I have a new
project using ZODB (migrating from sql). Everything is work well except
for one PersistentMapping class. Here's a snippet of the class:

class OORTable(PersistentMapping):
    def __init__(self, oordb, base_class, name=None):
        PersistentMapping.__init__(self)

        self._table_name = name or base_class.__name__
        self._columns = PersistentMapping()
        self._record_count = 0

 This OORTable is working as expected, but the attributes _table_name,
_columns, and _record_count are not always getting committed to the
ZODB, but everything else is (all other objects and their attributes).
 Here's what I have to far:

1) One test suite creates a new ZODB populates it and runs several
tests. If I run this suite on the now existing ZODB the attributes
described above don't exist, but everything else does...
2) Another test suite that open the ZODB populates it, then closes and
reopens it and then runs several tests, these attributes exist in the
ZODB.

Both tests above close the ZODB in the same manner

The web interface that utilizes the ZODB, has the same bazaar results.

from ClearWater import MLDB # A thin wrapper around ZODB
mldb = MLDB.MLDB(_cfg)
MLDB.mldb = mldb

Works fine until we restart the web server then OORTable attributes are
missing, but if we do:

from ClearWater import MLDB
MLDB.mldb = MLDB.MLDB(_cfg)

 All works as expected. I've been digging into every document I can find
to figure out this quirk and need to resolved this before putting it
into production (which is scheduled for next Wednesday).

Here's what is installed:

ZODB3-3.4.1-1
Python 2.3.4
Mandrake 10.1

Please, any help would be greatly appreciated, my nuts are in a bit of a
vise with this deadline.

-- 
Ron Wills <ron at rwsoft.ca>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20051020/0245d4e3/attachment.bin


More information about the ZODB-Dev mailing list