Ilias Lazaridis schrieb: > Gregor Horvath wrote: > ... > > >>I don't want to define the name attribute in every single SQLObject class. >> >>I came up with a solution: >> >>class Person(SQLObject): >> name = StringCol() >> >>class Professor(Person, SQLObject): >> timetable = StringCol() >> >>class Student(Person, SQLObject): >> year = StringCol() > > > I'm asking just out of curiosity: > > wouldn't the typical implementation be: > > class Person(SQLObject): > name = StringCol() > > class Professor(Person): > timetable = StringCol() > > class Student(Person): > year = StringCol() > > ? >
Yes, but this doesn't work because the tables are not generated by createTable if the object is not directly inherited from SQLObject. There's always room for improvement and patches are welcome -- Greg ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
