[Grok-dev] Re: Neanderthal sprint topics

Martijn Faassen faassen at startifact.com
Sun Sep 30 03:44:36 EDT 2007


Brandon Craig Rhodes wrote:
[snip]
> I have strenuously avoided using Grok model classes for objects that
> aren't persistent in the ZODB, because if they aren't in the ZODB,
> then I have a superstition that they should not inherit from
> Persistent!
> 
> But no one more experienced has ever weighed in on whether I'm correct
> in avoiding inheriting temporary objects from grok.Model.  It sure
> would be nice to have 'index' be their default view name again!  And
> having a traverse() method right on the object would be kind of nice
> too, though I'm still puzzled on whether mixing traversal information
> in with an object is a good idea.

It's fine to derive from a persistent object and simply never attach it 
to the persistent "tree". It will be temporary and go away.

[snip]
> The big issue, instead, is getting Zope to commit the open database
> transaction when a request finishes being processed.  Fortunately
> there is for SQLAlchemy a product named "z3c.zalchemy" that did this
> for me, so I did not have to write any code.  Maybe your sprint could
> focus first on producing a "z3c.zstorm" that does the same thing,
> borrowing from the zalchemy code?  I think that's more fundamental a
> thing to get working than the other.

I understood that this was already taken care of by the Storm 
integration code?

Regards,

Martijn



More information about the Grok-dev mailing list