|
Just the id is needed. tried that. seems to work for me: def __getstate__(self): return self.id def __setstate__(self,id): a=self.get(id) self.__dict__=a.__dict__ Only the id is needed. I don't like the way the object is copied (transfered should I say?). Do you think there is a smarter solution? I tried this. seem to work fine >>> a=Users.get(1) >>> import cPickle >>> b=cPickle.dumps(a) >>> c=cPickle.loads(b) >>> c <Users 1 login='asdf' password='asdfasdf' email="'[EMAIL PROTECTED]'" validated=True validationString='0sdr8z6kfj'> >>> c.password='qwerqwer' >>> a <Users 1 login='asdf' password='qwerqwer' email="'[EMAIL PROTECTED]'" validated=True validationString='0sdr8z6kfj'> >>> Oleg Broytmann wrote: On Fri, Jun 09, 2006 at 11:01:49AM +0200, sophana wrote: |
_______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
