Re: [ZODB-Dev] modifying tree under root and save ?!

2013-12-09 Thread Sean Upton
On Mon, Dec 9, 2013 at 10:19 AM, Tamer Higazi wrote: > Is there a way, to change the ZODB keys subcontent without to copy the > entire entry in the memory ?! You should -- as suggested previously -- for mutable collections, use PersistentDict and PersistentList, otherwise insertions, deletions, a

Re: [ZODB-Dev] modifying tree under root and save ?!

2013-12-09 Thread Tamer Higazi
Works out of the box like sugar! Thank you! Tamer On 09.12.2013 19:21, Claudiu wrote: Use persistent.dict.PersistentDict and persistent.list.PersistentList instead of dict and list. These have hooks to dirty the object whenever anything changes inside them. _

Re: [ZODB-Dev] modifying tree under root and save ?!

2013-12-09 Thread Claudiu
Use persistent.dict.PersistentDict and persistent.list.PersistentList instead of dict and list. These have hooks to dirty the object whenever anything changes inside them. On Mon, Dec 9, 2013 at 12:19 PM, Tamer Higazi wrote: > Hi people! > Inside the ZODB Tree I have a dictionary! > > root = {

[ZODB-Dev] modifying tree under root and save ?!

2013-12-09 Thread Tamer Higazi
Hi people! Inside the ZODB Tree I have a dictionary! root = { 'person: { 'amanda': [10,20,30] } } if I run: root['person']['amanda'].append(1000) and run: transaction.commit() close the db, start a new python shell nothing has changed so far. Why is that ?! Is there a way,