[Zope-CVS] CVS: Products/AdaptableStorage/zodb - ASConnection.py:1.20
Shane Hathaway
shane@zope.com
Fri, 21 Feb 2003 11:08:11 -0500
Update of /cvs-repository/Products/AdaptableStorage/zodb
In directory cvs.zope.org:/tmp/cvs-serv5192/zodb
Modified Files:
ASConnection.py
Log Message:
- Fixed storage and loading of ZClass instances.
IObjectSerializer.createEmptyInstance() now accepts an optional
class_loader. ASConnection provides a class loader that can load
ZClasses.
- Simplified configuration of mappers using "base" mappers. Derived
mappers and gateways start with the configuration of the base mapper.
- Enhanced the configurability of ObjectGateways and
ObjectSerializers: there are now removeGateway() and removeAspect()
methods.
=== Products/AdaptableStorage/zodb/ASConnection.py 1.19 => 1.20 ===
--- Products/AdaptableStorage/zodb/ASConnection.py:1.19 Thu Feb 6 14:08:52 2003
+++ Products/AdaptableStorage/zodb/ASConnection.py Fri Feb 21 11:08:10 2003
@@ -90,7 +90,8 @@
mapper = self.getRootMapper()
for mapper_name in mapper_names:
mapper = mapper.getSubMapper(mapper_name)
- object = mapper.getSerializer().createEmptyInstance(classification)
+ object = mapper.getSerializer().createEmptyInstance(
+ classification=classification, class_factory=self.classFactory)
assert object is not None
object._p_oid=oid
@@ -120,7 +121,8 @@
mapper = mapper.getSubMapper(mapper_name)
ser = mapper.getSerializer()
- object = ser.createEmptyInstance()
+ object = ser.createEmptyInstance(
+ class_factory=self.classFactory)
if object is not None:
object._p_oid=oid
object._p_jar=self
@@ -425,6 +427,9 @@
keychain = self._db._oid_encoder.decode(oid)
return keychain[-1]
+
+ def classFactory(self, module, name):
+ return self._db._classFactory(self, module, name)
def exportFile(self, oid, file=None):
raise NotImplementedError, 'ZEXP Export not implemented'