BackTalk to Document Zope Developer's Guide (2.4 edition)/ZODB Persistent Components

[email protected]
Newsgroups gmane.comp.web.zope.zdp
Message-ID <[email protected]>
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZDG/current/Persistence.stx#2-22

---------------

    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.

_______________________________________________
ZDP maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zdp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.