On Fri, Jun 09, 2006 at 10:11:55PM +0200, sophana wrote:
> >> def __setstate__(self,id):
> >> a=self.get(id)
> >> self.__dict__=a.__dict__
> >
> > This breaks cache - "a" is now in the cache instead of self. See how
> > .get() is implemented.
> >
> Yes there is a big problem
> Does someone has a suggestion?
You have to model __setstate__ after get() - call self._init(id), put
self into the cache...
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss