pbreit's answer will work as well. In case you don't grok left joins, check out the book at this link:
http://www.web2py.com/book/default/chapter/06#One-to-Many-Relation No matter your experience level, it is very helpful to Read The Fine Manual. Web2py has plenty of neat features to make life easier for the web developer. On Oct 1, 6:07 pm, pbreit <pbreitenb...@gmail.com> wrote: > I think this works: > > db(db.b.link==None).select(db.a.ALL, db.b.ALL, > left=db.b.on(db.a.id==db.b.link))