new syntax db(db.dog_id.belongs(db.dogs.owner=='james')).select(), thanks guruyaya

This commit is contained in:
Massimo Di Pierro
2012-02-09 11:21:38 -06:00
parent 4228350d19
commit d1e654ee23
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-09 11:15:33) stable
Version 1.99.4 (2012-02-09 11:21:10) stable
+2
View File
@@ -6914,6 +6914,8 @@ class Expression(object):
return Query(self.db, op, self, value)
def belongs(self, value):
if isinstance(value,Query):
value = self.db(value)._select(value.first._table._id)
return Query(self.db, self.db._adapter.BELONGS, self, value)
def startswith(self, value):