From: John R. <joh...@gm...> - 2005-07-05 22:45:06
|
Howdy. I have two columns, one of which is computed from the other.=20 So my plan was to write a setter for one that set the other. This seems to work fine, except in the constructor. class X(SQLObject): name=3D StringCol(length=3D255, default=3DNone, unique=3DTrue) fullName=3D StringCol(length=3D255, default=3DNone) def _set_fullName(self, fullName): = =20 if fullName is not None: self.name=3D magicallyUniqueThingDerivedFrom(fullName) self._SO_set_fullName(fullName) This works: X().fullName=3D 'whatever' -- the name attribute gets updated appropriately. But this doesn't: X(fullName=3D 'whatever') -- the name attribute is still None. Is there a way to make both work? |