[SQL-CVS] r1351 - home/phd/SQLObject/paramstyles/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-12-06 16:47:51
|
Author: phd
Date: 2005-12-06 16:47:42 +0000 (Tue, 06 Dec 2005)
New Revision: 1351
Modified:
home/phd/SQLObject/paramstyles/sqlobject/joins.py
Log:
Merged patches from the revisions 1348:1350 from the trunk: a patch by Randall Smith <ra...@tn...> to fix .select().filter().
Modified: home/phd/SQLObject/paramstyles/sqlobject/joins.py
===================================================================
--- home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-06 16:46:24 UTC (rev 1350)
+++ home/phd/SQLObject/paramstyles/sqlobject/joins.py 2005-12-06 16:47:42 UTC (rev 1351)
@@ -224,15 +224,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):
|