Today I learned: Primary and Secondary Joins

While developing my app I had to shape the data I get from the SQLAlchemy in a simplified way. Given models Client, Order, Receipt, where Order is referencing Client and Receipt is referencing Order I wanted to access in a view only relationship all receipts directly from the Client model. The way this is done …