Should be tag = db(db.tags.name=='testtag').select().first() q = db.branch.tags.contains(tag.id) branch = db(q).select().first()
On Mar 16, 2:40 pm, goutham <[email protected]> wrote: > ===== my model ====== > db.define_table('tags', > Field('name','string', unique= True), > format='%(name)s') > > db.define_table('branch', > Field('name','string'), > Field('users', 'list:reference auth_user'), > Field('tags','list:reference tags'), > format='%(name)s') > > ======= my controller ======= > tag = db(db.tags.name=='testtag').select().first() > q = db.branch.tags.contains(tag) > branch = db(q).select().first() > > after performing this operation the value in branch is None .... I > have inserted proper corresponding values in db using dbadmin. > > why arn't the query working ?

