[ZODB-Dev] forgetting self._p_changed
Kasper Souren
Kasper.Souren@ircam.fr
Sun, 9 Mar 2003 23:57:32 +0000
> Second Question: I think it should be possible to change python, so it
> marks the lists and dictionaries as changed, so that you don't need to
> set _p_changed. I am not familiar with the details. What do you, the
> ZODB experts think about this?
Instead of a dict you should use the PersistentMapping, it does exactly this.
I guess there's also a Persistent thingy acting like a list.
I'm using Standalone-ZODB and I need to do "from Persistence import
PersistentMapping".
And eh, I am not a ZODB expert, so I might be slightly wrong here, but it
works great for me. I had subclassed dict (Python 2.2 stuff) so I only needed
to replace "class my_dict(dict):" by "class my_dict(PersistentMapping):" to
have it working like a charm.
bye,
Kasper