Author: phd
Date: 2004-12-28 12:12:57 +0000 (Tue, 28 Dec 2004)
New Revision: 502
Modified:
home/phd/SQLObject/inheritance/sqlobject/main.py
Log:
Fixed a bug: put all needed classes into the tableRegistry before searching for parents.
Modified: home/phd/SQLObject/inheritance/sqlobject/main.py
===================================================================
--- home/phd/SQLObject/inheritance/sqlobject/main.py 2004-12-28 12:03:13 UTC (rev 501)
+++ home/phd/SQLObject/inheritance/sqlobject/main.py 2004-12-28 12:12:57 UTC (rev 502)
@@ -1351,10 +1351,13 @@
#DSM: and will do himself the relationship between classes.
if type(self.clause) is not str:
tableRegistry = {}
- for registryClass in classregistry.registry(sourceClass._registry).allClasses():
+ allClasses = classregistry.registry(sourceClass._registry).allClasses()
+ for registryClass in allClasses:
if registryClass._table in tablesDict:
- #DSM: By default, no parent are needed for the clauses
+ #DSM: By default, no parents are needed for the clauses
tableRegistry[registryClass] = registryClass
+ for registryClass in allClasses:
+ if registryClass._table in tablesDict:
currentClass = registryClass
while currentClass._parentClass:
currentClass = currentClass._parentClass
|