Re: [SQLObject] Inheritance strangeness
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <ab...@ne...> - 2005-06-06 02:31:55
|
Quoting Oleg Broytmann <ph...@ph...>: > On Fri, Jun 03, 2005 at 07:05:50PM +1000, ab...@ne... wrote: > > I've discovered what seems to be a bug in sqlobject class inheritance= . >=20 > I have committed a patch at the revision 810 that should fix this > problem and also all problems with inherited tables with no attributes. > Please give it a try and report. Seems to be fixed now - thanks very much! > > in my situation not all > > my inherited classes define extra attributes (e.g. they instead have > > different behaviour etc.) > =20 > PS. I wonder how do they have different behavior without any > attributes? Via properties, I suppose? The subclasses have different behaviour in that they all have a method ca= lled e.g. 'Do' but implement it differently. Some subclasses need extra attri= butes in order to support their particular imlpementation, other subclasses don= 't. I've actually implemented a reasonably complex 'state design pattern' and= the states are subclasses, which are all persisted via sqlobject. Thank good= ness sqlobject came with inheritance support - and I think such an elegant way= of doing it too. Andy Bulka http://www.atug.com/andypatterns ------------------------------------------------------------ This email was sent from Netspace Webmail: http://www.netspace.net.au |