db(~db.sometable.id.belongs(db.othertable.select(db.othertable.id)) The tilde means 'not'
On Oct 1, 4:16 pm, monotasker <scotti...@gmail.com> wrote: > I have two tables (db.A and db.B) and db.B has a field that links to db.A > (in db.B model: Field('link', 'db.A')). How do I select rows from db.A that > do *not* have a corresponding db.B.link field? > > I've tried to solve this from several angles and so far have had no luck. I > suspect I'm missing something obvious. > > Thanks