[Grok-dev] model not getting persisted
Fernando Correa Neto
fcdoth at gmail.com
Thu Mar 22 18:41:13 EDT 2007
Hi,
On 3/22/07, Tim Terlegård <tim at se.linux.org> wrote:
> If I have a model like this the x variable won't survive a server
> restart.
>
> class MyModel(grok.Model):
> x = PersistentList()
>
I don't think it works even in a plain zope3.
Some time ago I've created a adapter for annotaions that had
PersistentList and PersistentDict and the *only* way to have it
persisted was having then initialized like you did you the second
example.
Reasons for that not work? I don't know :D
Cheers,
Fernando
> After I restart server the list is empty again. If the model is like
> this it's ok.
>
> class MyModel(grok.Model):
> def __init__(self):
> self.x = PersistentList()
>
> I think I can do both ways in pure zope3, but when doing the former way
> in grok it won't be persistent. How come?
>
> Tim
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>
More information about the Grok-dev
mailing list