[ZODB-Dev] persisting "immutable" classes

Christian Robottom Reis kiko at async.com.br
Sat Feb 28 11:14:01 EST 2004


On Sat, Feb 28, 2004 at 11:05:13AM -0500, John Belmonte wrote:
> Dieter Maurer wrote:
> >When you attach a non-persitent object to a persistent
> >one, it will get part of this persistent object (as far
> >as the persistency mechanism is concerned).
> >Whether this is adequate is application dependent.
> 
> What do you mean by "it will get part of this persistent object"?

Basically, the state of the non-persistent object is persisted together
with the persistent object's state, and when the persistent object is
unghosted, the non-persistent object's state is also restored. A
reference to another persistent object, on the other hand, causes only
the reference itself to be restored (along with anything else in
__dict__) when the referring object is unpersisted; state is loaded
lazily.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



More information about the ZODB-Dev mailing list