On 7/13/06, David Binger <[EMAIL PROTECTED]> wrote:

On Jul 13, 2006, at 12:55 PM, Chris S wrote:

> I don't think this is the case. Consider my simple example below. None
> of my classes inherit Persistent, and even though I set _p_changed =
> 1, nothing's persisted.

In your example, it seems like there is a missing
root['bob'] = User('bob')
to get things started.

That would overwrite my User with a new instance each run, defeating
the purpose of persistence.

The line:
parent = root.get(parentName, User(parentName))
initializes things if the user was not yet created.

For more information about ZODB, see the ZODB Wiki:

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

Reply via email to