I've been banging on this for hours, but I seem to be getting nowhere. I've tried more things that I can count, but here are two of my attempts:
# result = ( # Pipeline.query # .select_from(Storage, NewProduct) # .join(Storage, pipeline_alias1.storage_id == Storage.id) # .join(NewProduct, Storage.product_id == NewProduct.id) # .filter(pipeline_alias2.storage_id == storage_alias1.id) # .filter(storage_alias2.product_id == product_alias1.id) # ) result = ( Pipeline.query .select_from(Pipeline, Storage, NewProduct) .join(Storage, pipeline_alias1.storage_id == storage_alias1.id) .join(NewProduct, storage_alias2.product_id == product_alias1.id) ) I keep getting: sqlalchemy.exc.InvalidRequestError: Can't determine which FROM clause to join from, there are multiple FROMS which can join to this entity. Please use the .select_from() method to establish an explicit left side, as well as providing an explicit ON clause if not present already to help resolve the ambiguity. How can I tell SQLAlchemy which FROM to use? Thanks! -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/CAOvKW57frKP1EACaQ4zoRwu7kDAUULAbXx1xFi8eVdw69tZCZg%40mail.gmail.com.