I have an example here https://gist.github.com/ojomio/aa5eca3bea03d21e00e8. This code issue exactly one query and load everything at one time What I am asking about is line https://gist.github.com/ojomio/aa5eca3bea03d21e00e8#file-gistfile1-py-L65
If I don not use alias *second_B* and simply write ).join( AWithChildren.bs ).options( contains_eager(B.as_). contains_eager(A.children, alias=AWithChildren). contains_eager(AWithChildren.bs). joinedload(B.cs) ) Then SQLAlchemy issue another query on *C* table, apparently not matching expression AWithChildren.bs and B So my question is - if there are many other tables after *A.children -* should use alias() for every one and mention them like .joinedload( PreviousTable.relation, alias=SomeTableAlias ). ? -- 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 post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.