[web2py] Re: select only one table in a joined select

2014-06-04 Thread Robin Manoli
LaDarrius, the point to have the join is to get the tag properties in one query. Your solution only returns the tag id's. Annet, tweaking your solution made it work: *dbTags = db((db.product_tag.product==row.product.id)&(db.product_tag.tag==db.tag.id)).select(db.tag.ALL)* Thanks for your help g

[web2py] Re: select only one table in a joined select

2014-06-03 Thread Annet
Hi Robin Assuming your product_tag table contains product Ids and tag Ids and you want a list of tags for a given product id This should work : tags = db((db.product_tag.product==row.product.id)&(db.product_tag==db.tag.id)).select(db.tag.name).as_list() Regards, Annet -- Resources: - http:

[web2py] Re: select only one table in a joined select

2014-06-03 Thread LaDarrius Stewart
The join is making that happen. Why not just do *dbTags = db(db.product_tag.product==row.product.id ).select(db.product_tag.tag)* *Whats the point in the join on a m2m table?* On Tuesday, June 3, 2014 3:54:52 AM UTC-5, Robin Manoli wrote: > > Hey, I have a many-to-manyrel