On Nov 14, 2008, at 6:51 PM, Shane Hathaway wrote:
> 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
>>> 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?
>>> B) it's never saved at all?
>>> 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
> 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
> without using pickles. I don't think this area has been explored
> as much as it deserves.
Yup. In theory. Currently, persistent's implementation is highly tied
to ZODB, although I have plans for a much scaled down persistent in
ZODB4. (Well, out of ZODB4, since it will no longer depend on ZODB. :)
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org