[ZDP] BackTalk to Document Zope Developer's Guide (2.4
edition)/ZODB Persistent Components
webmaster at zope.org
webmaster at zope.org
Mon Mar 15 09:33:15 EST 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZDG/current/Persistence.stx#2-23
---------------
Don't forget to call 'commit()', so that the changes you have made
so far are committed to the database, and a new transaction is
begun.
% Anonymous User - Apr. 10, 2003 5:03 pm:
This example seems to break the fourth rule as mentioned below. You are adding to the root's employees entry,
a list, which is a mutable thing.
At least, this is true when running the Python interpreter with a standalone ZODB.
% Anonymous User - Nov. 22, 2003 11:44 pm:
No, it is saying that you must notify the database to persist each change after it has been made, because the
default Python list type does not know about persistence. If you use the types provided with ZODB, then
changes will be persisted automatically. The type is smart enough to update the database when the in-memory
copy changes.
% Anonymous User - Mar. 15, 2004 9:33 am:
well said
More information about the ZDP
mailing list