I am trying to implement a select with a nested select clause, to find parents without any children. My tables (radically simplified) are as follows:
class Pers
Join worked for me. Thank you. In my case I was trying to find all ordered objects (Topics) which belong to a particular customer. I have 3 tables Customer, Order, Topics
stmt = db.session.query(Topics).outerjoin(Order).\ filter(Order.cust_id == id) topics = stmt.all()