> > MUST we explicitly supply the join to such query objects? Or is there
> > some way that SA can figure out that tbl_people_documents is in
> > between tbl_people and tbl_documents on its own? Perhaps there is
> > something we can add to the tbl_people/tbl_documents object
> > definitions that clues SA in?
>
> join on the relation.
>
> query(A).join(A.relation_to_b).filter(B.foo == 'bar')

The problem with that, from what we're trying to build, is that we
have to explicitly know that relation object and supply it.

We want SA to *infer* the relationship between any two tables based on
the ORM relationships that we have already defined in our mapper
objects.

Again, my example was not the joining between two adjacent tables,
which we can get SA to handle on its own without our help. It was
between two tables that are adjacent only through an intermediary
table that touches both of them.

--Damon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to