[SQLObject] weird SQLObject subclassing thing
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: ludwig z. <lu...@mu...> - 2004-05-22 17:32:32
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi just upgraded from 0.5.2 to the svn version. code like this: class Sub(SQLObject): ... class Person(Sub): _fromDatabase = True which used to work in 0.5.2, now produces: Traceback (most recent call last): File "test.py", line 31, in ? class Person(Sub): File "/usr/lib/python2.3/site-packages/sqlobject/main.py", line 159, in __new__ newClass.addColumnsFromDatabase() File "/usr/lib/python2.3/site-packages/sqlobject/main.py", line 460, in addColumnsFromDatabase for columnDef in cls._connection.columnsFromSchema(cls._table, cls): AttributeError: 'NoneType' object has no attribute 'columnsFromSchema' incidently, i found out that the following does work, though: class Sub(SQLObject): ... class SubSub(Sub):pass class Person(SubSub): _fromDatabase = True and actually, my current setup now requires a SubSubSub class... am i missing something? lg lu - -- >> http://lu.mur.at/lu.pub.key.html << -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAr46yea0RHHXBzw0RAvYBAJ4+pk03Rl9eFWD+5s7khW3EjRhr3ACfX4QD fSAisEkLZnmUTZWnZ82oS/E= =2Ut9 -----END PGP SIGNATURE----- |