"Oleg Broytmann" <phd@...> wrote in message
> On Thu, Feb 16, 2006 at 02:40:10PM +0800, gary ng wrote:
> > I used the Inheritance feature(was 0.7 then trunk), but it seems that
> > change in revision 1435 breaks things.
> > What I have is a simple :
> > InheritableSQLObject -> middle_class -> leaf_class
> > Since I use _from_database, I have to create "child_name" myself in
> > middle_class
> Probably a bug. Can you you show a short example?
The class definition is pretty simple(I am working with TurboGears):
_connection = hub
table = "middle"
fromDatabase = True
The sql statement :
CREATE TABLE middle (
id SERIAL UNIQUE NOT NULL PRIMARY KEY
The error :
/main.py", line 315, in addColumn
assert name not in sqlmeta.columns, (
AssertionError: The class test9.middlesql.MiddleSQLObject already has a
column 'childName' (<StringCol 40b6216c childName>), you cannot add the
column <StringCol 40b620cc childName>
I tracked it down to inheritance/__init__.py line
If I comment out the manual addColumn of "childName", I don't see the above
error(though not sure if the system works as I am in the middle of a lot of
change of TurboGear). In addition, the two checking in the same
function("childName" as reserved name and column name defined in parent
class) also needs to be commented out or I would see other error.