suppose I have the following tables (in pseudo-code)
User:
* userid
* name
Thing
* thingid
* name
* userid
Thing.user = relation(User, User.userid==Thing.userid)
Now, If I have the following query:
query =
session.query(Thing).option(joinedload('user')).join(User).filter(User.name
==
I want to avoid double joining on the same table. I know query._from_obj is
where the query stores the join elements. However, it's not there if the
join is from query.options(joinedload('some_relation')). For example, I
have the following table relations:
User:
* userid
* name
Thing
*