In a function I have the following query:
labels = db(db.vtx_label.vertexID==vertexID)._select(db.vtx_label.label)
join = db.vtx_vertex.on((db.vtx_label.vertexID==
db.vtx_vertex.id) & (db.vtx_vertex.typeID==IOTHINGID))
rowset = db((db.vtx_label.label.belongs(labels)) & (db.vtx_label.vertexID!=vertexID))
count = rowset.count()
rows = rowset.select(join=join)
The problem is that the rowset needs the join to count right, is there a way to
solve this issue other then this:
labels = db(db.vtx_label.vertexID==vertexID)._select(db.vtx_label.label)
rowset = db((db.vtx_label.label.belongs(labels)) & (db.vtx_label.vertexID!=vertexID) &
(db.vtx_label.vertexID==
db.vtx_vertex.id) & (db.vtx_vertex.typeID==IOTHINGID))
count = rowset.count()
rows = rowset.select()
I'd like to keep the join separate from the where clause.
Best,
Annet