Re: [Zope-dev] Changing and migrating persistence structure

2010-08-09 Thread Marius Gedminas
On Mon, Aug 09, 2010 at 09:03:18AM +0800, Martin Aspeli wrote: On 8 August 2010 20:29, Hanno Schlichting ha...@hannosch.eu wrote: There should be some way of doing this with custom __getstate__ and __setstate__ methods. It's just tricky to get right and a bit fragile. It's much easier

Re: [Zope-dev] Changing and migrating persistence structure

2010-08-08 Thread Martin Aspeli
Hi Jim, On 08/08/2010, Jim Fulton j...@zope.com wrote: On Thu, Aug 5, 2010 at 2:36 AM, Martin Aspeli optilude+li...@gmail.com wrote: ... I have a package (plone.registry) that currently has a persistent structure like this: Registry(Persistent) | +-- Records(Persistent) |

Re: [Zope-dev] Changing and migrating persistence structure

2010-08-08 Thread Hanno Schlichting
On Sun, Aug 8, 2010 at 2:21 PM, Martin Aspeli optilude+li...@gmail.com wrote: On 08/08/2010, Jim Fulton j...@zope.com wrote: On Thu, Aug 5, 2010 at 2:36 AM, Martin Aspeli optilude+li...@gmail.com wrote: What is the best way to manage this type of migration? Today, it probably makes the most

Re: [Zope-dev] Changing and migrating persistence structure

2010-08-08 Thread Martin Aspeli
On 8 August 2010 20:29, Hanno Schlichting ha...@hannosch.eu wrote: There should be some way of doing this with custom __getstate__ and __setstate__ methods. It's just tricky to get right and a bit fragile. It's much easier to write the migration code if both the old and new class are

Re: [Zope-dev] Changing and migrating persistence structure

2010-08-07 Thread Jim Fulton
On Thu, Aug 5, 2010 at 2:36 AM, Martin Aspeli optilude+li...@gmail.com wrote: ... I have a package (plone.registry) that currently has a persistent structure like this: Registry(Persistent) | +-- Records(Persistent)       |       +-- BTree of Record(Persistent)              |