[Grok-dev] Persistence issue with grok.Model

Martijn Faassen faassen at startifact.com
Fri Jan 2 15:27:19 EST 2009


Andreas Jung wrote:
> The instance dict of a Job instance holds the **kw dict until I restart
> my Grok instance. After the restart the instance dict is empty. Is there 
> something I am missing or some further magic involved (do I need a 
> schema for a Grok Model in order for having the instance dict properly
> persisted)?

Shouldn't have anything to do for schemas.

I know Brandon and Uli brought this up too, but it's quite possible that 
after a restart your "Job" objects remain ghosted until you actually try 
to access anything on them. Therefore the __dict__ might be empty. Just 
trying to access some attribute on 'job' would be a way to verify this. 
Please let us know!

I wonder why the ZODB is not able to perceive a __dict__ access as an 
attribute access, however.

Even though Zope 3 or Grok don't do much in the way of magic here, I'd 
be interesting to verify whether this happens in complete isolation from 
anything but the ZODB. My blog entry contains a recipe for a simple ZODB 
test script that you might want to adjust:




More information about the Grok-dev mailing list