Re: [SQLObject] Structs / Inheritance Table Definition
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Gregor H. <gh...@gr...> - 2006-11-11 08:09:16
|
Ilias Lazaridis schrieb: > > > I see, possibly this would work: > > class SOAbstract(SQLObject): > pass > > class Person(SOAbstract): > name = StringCol() > > class Professor(Person, SQLObject): > timetable = StringCol() > > class Student(Person, SQLObject): > year = StringCol() > I tried this but doesn't work either because than name field in Professor/Student is not generated because Person is not directly inherited from SQLObject. Would be nice if createTable would look down the inheritance path if a object is somewhere inherited from SQLObject. -- Greg |