On Mon, Jun 12, 2006 at 11:50:49AM +0200, sophana wrote:
> class MySqlObject(SQLObject):
>    def __getstate__(self):
>        return self.id
>    def __setstate__(self,id):
>        pass
>    def __new__(cls, *args, **kw):
>        if len(args) == 1:
>            return cls.get(args[0])
>        return SQLObject.__new__(cls, *args, **kw)
> 
>    def __getnewargs__(self):
>        return (self.id,)

   I think it'd be a good idea to add this to SQLObject. Ian?

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

Reply via email to