[Grok-dev] zope.generations and IIntIds issue

Christian Klinger cklinger at novareto.de
Fri Jul 1 03:36:41 EDT 2011


Hi Jeroen,

i am not sure if i understand you correctly. But maybe the
zodbupdate [1], helps you to archive this task.


Christian

[1] http://pypi.python.org/pypi/zodbupdate/0.5

>
> I solved the problem using a different approach.
> What I was doing was this: in my previous generation I has a class that
> derived from grok.Model, and in my current generation, I need it to be a
> grok.Container, so I needed to do some trickery to get the old data from the
> database to be able to create a new instance. Maybe that confused the
> KeyReference creation somehow. That's why I put it in grok-dev, but forgot
> to mention it ;-)
>
> Now that I'm at it: what is the recommended way to do something like that?
> I moved the old class definition to my evolveX script, and before loading
> the old instances from the db, I replaced the new definition in the
> appropriate module with the old one, and before creating new instances, I
> switched the definitions back to normal. That seemed to do the trick.
> However, is there a nicer way to do it, or a way to just upgrade existing
> instances to the new definition without having the create new ones and
> copying the old data?
>
>
> Christian Klinger wrote:
>>
>> Hi Jeroen,
>>
>> sorry i don't a answer for your question. I guess this is not a grok
>> related problem, so i recommend to put this post on
>>
>> gmane.comp.web.zope.devel
>>
>> too. You will reach more people there.
>>
>> Christian
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> https://mail.zope.org/mailman/listinfo/grok-dev
>>
>>
>




More information about the Grok-dev mailing list