new syntax db(db.dog_id.belongs(db.dogs.owner=='james')).select(), thanks guruyaya
This commit is contained in:
1 parent
4228350d19
commit
d1e654ee23
2 files changed
+3
-1
No files matched your search
@@ -1 +1 @@
|
||||
Version 1.99.4 (2012-02-09 11:15:33) stable
|
||||
Version 1.99.4 (2012-02-09 11:21:10) stable
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user