[Zope] PersistentMapping not persistent?

seb bacon seb@jamkit.com
Wed, 7 Nov 2001 19:47:51 +0000


* alex@quad.com.ar <alex@quad.com.ar> [011107 18:57]:
> ok, here's a simplified view of my object
> 
> __init__(self):
>    self.data=PersistentMapping()
> 
> createUser(self,user,password,roles=[]):
>    self.data[username]={'username': username, 'password': password, 'roles':
> roles}

> can you see any potential problem in that code?

It looks to me like your problem is that self.data is a
PersistentMapping, but self.data[username] isn't.

Have you tried:

> createUser(self,user,password,roles=[]):
>    self.data[username]=PersisentMapping()
>    self.data[username].update({'username': username, 'password': password, 'roles':roles})


seb.