[Grok-dev] zope.generations and IIntIds issue
cklinger at novareto.de
Fri Jul 1 03:36:41 EDT 2011
i am not sure if i understand you correctly. But maybe the
zodbupdate , helps you to archive this task.
> 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
>> too. You will reach more people there.
>> Grok-dev mailing list
>> Grok-dev at zope.org
More information about the Grok-dev