Isn't this what the "generations" code is for?



Pete Taylor wrote:
Hi all,
I've run into an interesting issue.  I've been building an application
in zope3 over the last few months to meet a business need where I
work.  Basically just capturing a lot of data about prospective
insurance agencies, creating applications for them, pdfing them
(reportlab rocks), and emailing the responsible parties, archiving the
applications, etc.

the issue is though that as the business community comes back to me
with changes, there are cases where the object design itself needs to
be modified.  Things that were Textline's need to be Lists, etc, as
they determine that they would like to capture extra values for
similar data, and what have you.

obviously it's not a problem for just modifying the objects for all of
them going forward, but for all old data and archived applications, I
need to update the old objects to fit the new interfaces.  as an
example, the original design spec only allowed for one agency owner. it was a Textline. they then asked to be able to have multiple
owners, in the case of a partnership.  I would, of course, then change
"owner" to "owners" and make it a List, and modify the relevant bits
in the rest of the code.  but all the old applications will just have
a single "owner" Textline as that particular attribute for the class. I need to be able to go through the old applications, find all
instances of "owner", create "owners" in the stored object, and make
the original "owner" a single element in the new list.

my issue is how to do this offline in the zodb.  I've read through the
posts I can find on manipulating the zodb, but I haven't really
"gotten" it, and a lot of what i can find is zope2 stuff...  my
knowledge of the zodb isn't extensive, so the zope2 info may still be

if anyone has links or recommendations on where to look to start doing
this kind of thing, that would be excellent, as would any advice on
do's and don't's.  as this application lives in our environment,
changes to the design will inevitably create this issue time and
again, so I'd like to know how to confront changes like this in a
workable way.


"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic
Zope3-users mailing list

Simplistix - Content Management, Zope & Python Consulting
Zope3-users mailing list

Reply via email to