[PEAK] Pickling Trellis objects?
Phillip J. Eby
pje at telecommunity.com
Sat Aug 25 12:21:57 EDT 2007
At 07:34 PM 8/24/2007 -0700, Justin Ryan wrote:
>Would it be crazy to try and adapt a persistent zope3 component to a
>Component which can be managed by the trellis at runtime, but
>serialized in simpler form?
You mean adapt, in the sense of declaring a component class as an
adapter for a persistent object? Sure, you could do that.
But you'll need to watch out for the fact that trellis components
aren't lazy in terms of object references, so if your ZODB component
refers to other ZODB objects that you're adapting to
trellis.Components, you could end up loading an entire object graph.
You'll probably need at least the lazy-loading support of TrellisDB
to do something like that.
More information about the PEAK