Jim Fulton wrote:
> On Nov 14, 2008, at 6:16 PM, Paul Winkler wrote:
>> If I instantiate a subclass of Persistent, but I don't ever assign it
>> as an attribute on the root (or any other Persistent instance) ...
>> then what happens to my instance when the transaction commits?
>> A) it's saved in the ZODB, but not reachable?
>> or
>> B) it's never saved at all?
>> or
>> C) something else that I can't imagine?
> B. IOW, nothing.

... which opens the door for a lot of interesting ways to use the
persistence framework.  Linking your object to the root causes your
object to be managed by a ZODB.Connection and you get all the associated
assumptions about pickling, ID management, etc.  But if you instead
assign the object to some persistence manager other than a
ZODB.Connection, you could integrate with other kinds of storage systems
without using pickles.  I don't think this area has been explored nearly
as much as it deserves.


For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to