Chris S wrote:
I'm trying to adopt some code to use ZODB as its persistence level.
I've read the "Writing a Persistent Class" article
(http://www.zope.org/Wikis/ZODB/FrontPage/guide/node3.html#SECTION000350000000000000000)
but how do you persist a class that already inherits another class?
Does ZODB work with multiple inheritence?
Yes.
Also, how should I persist
objects in libraries beyond my control? For example, I'd like to
persist instances of pyrobot.brain.conx.Network
(http://pyrorobotics.org/?page=Building_20Neural_20Networks_20using_20Conx).
Is there any ability in ZODB to retroactively wrap objects in a
persistence mechanism instead of having to rewrite an entire library
to use the Persistent class?
You can always persist (almost) any object, even if it does not subclass
from Persistent. However, any changes to the object will not be detected
automatically and you would have to either a) reassign the object to the
ZODB or b) mark it as changed using _p_changed()
Christian
--
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev