Hello Iap,
>> The interitance relationship seems broken after export/import
between different ZODB.
Following is the message I have posted about this bug in January.
I have mentioned already this bug several time, but until now I seemed
to be the only one that care about this bug. (which makes me ask question
about how much or how little the Zope community is using object orientation
and inheritance with the Dtml language).
I have personally stopped all design on the Zope platform (which I find
some concept very interesting), and am concentrating my effort on Java/servlets
because of this bug.
I hope you find some way to solve your problems.
Bye,
Thierry
-----Original Message-----
From: Thierry Nabeth [mailto:Thierry.Nabeth@insead.fr]
Sent: Saturday, January 06, 2001 10:46 PM
To: zope@zope.org
Cc: Thierry Nabeth
Subject: Serious BUG in Export. ==> pb of lost inheritance if export /
reimport.
Hello,
I would like to mention a very serious bug (for me), that prevent to use
inheritance between two classes defined in two different package, if
you have to export and reimport those packages.
In a previous mail I mentionned a problem of Inheritance lost between
packages.
I spent a lot of time investigating the problem, and in particular looking
in the
export file (xml version).
First here is the test:
Phase 1: create the products and the classes.
Create a product PA
Create a class A in the product PA.
Create a method "test" in class A. (this method display "before").
Create a product PB
Create a class B in the product PB which inherits from A.
Create an instance a of A.
Create an instance b of B.
Phase 2: test the inheritance. ==> everything works fine
Executing the method "test" on those two instances return.
a.test ==> "before"
b.test ==> "before"
The result is correct.
Phase 3: export / reimport product PB, and modify methode "test".
Export the product PB. (PB.zexp is generated)
Delete the product PB and restart zope.
Import the product PB (PB.zexp) and restart zope.
Modify the method "test" in class A.. (this method display "after").
Phase 4: test the inheritance. ==> B does not work correctly.
Executing the method "test" on those two instances return.
a.test ==> "after"
b.test ==> "before" ####### this is incorect. !!!!!!
I spent a lot of time investing this problem, in particular looking
in the xml export file.
The problem is that when you export PB, the exported file also
contain the definition of class A.
When you re-import PB, B inherits from a class A that is different
from the class A that is in the product PA.
You have a kind of Zombie class A.
(note: reimporting class A doesn't solve the problem).
If someone has some idea how to fix this bug which almost forbid
the use of inheritance between products in zope (unless you have a
master server that never import anything) ?!
Thierry Nabeth
Research Fellow,
INSEAD CALT (The Centre for Advanced Learning Technologies)
http://www.insead.edu/CALT/
Thierry.Nabeth@insead.fr