Author: phd
Date: 2004-12-24 09:28:53 +0000 (Fri, 24 Dec 2004)
New Revision: 494
Modified:
home/phd/SQLObject/inheritance/sqlobject/main.py
Log:
Extract tablesDict from orderBy in addition to clause.
Modified: home/phd/SQLObject/inheritance/sqlobject/main.py
===================================================================
--- home/phd/SQLObject/inheritance/sqlobject/main.py 2004-12-22 15:54:23 UTC (rev 493)
+++ home/phd/SQLObject/inheritance/sqlobject/main.py 2004-12-24 09:28:53 UTC (rev 494)
@@ -1340,6 +1340,9 @@
self.clause = clause
tablesDict = sqlbuilder.tablesUsedDict(self.clause)
tablesDict[sourceClass._table] = 1
+ orderBy = ops.get('orderBy')
+ if orderBy and not isinstance(orderBy, basestring):
+ tablesDict.update(sqlbuilder.tablesUsedDict(orderBy))
#DSM: if this class has a parent, we need to link it
#DSM: and be sure the parent is in the table list.
#DSM: The following code is before clauseTables
|