[SQL-CVS] r1350 - SQLObject/branches/0.7-bugfix/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-12-06 16:46:31
|
Author: phd Date: 2005-12-06 16:46:24 +0000 (Tue, 06 Dec 2005) New Revision: 1350 Modified: SQLObject/branches/0.7-bugfix/sqlobject/joins.py Log: Merged revs 1348:1349: a patch by Randall Smith <ra...@tn...> to fix .select().filter(). Modified: SQLObject/branches/0.7-bugfix/sqlobject/joins.py =================================================================== --- SQLObject/branches/0.7-bugfix/sqlobject/joins.py 2005-12-06 16:45:39 UTC (rev 1349) +++ SQLObject/branches/0.7-bugfix/sqlobject/joins.py 2005-12-06 16:46:24 UTC (rev 1350) @@ -222,15 +222,18 @@ 'otherCol' : self.otherColumn, 'idValue' : inst.id, } - results = self.otherClass.select('''\ + clause = '''\ %(otherTable)s.%(otherID)s = %(interTable)s.%(otherCol)s and %(interTable)s.%(joinCol)s = %(table)s.%(ID)s and -%(table)s.%(ID)s = %(idValue)s''' % options, clauseTables=( - options['table'], - options['otherTable'], - options['interTable'], - )) - # TODO (michelts), apply order by on the selection +%(table)s.%(ID)s = %(idValue)s''' % options + results = self.otherClass.select(sqlbuilder.SQLConstant(clause), + clauseTables=( + options['table'], + options['otherTable'], + options['interTable'], + ) + ) + # TODO (michelts): apply orderBy on the selection return results class SQLRelatedJoin(RelatedJoin): |