This is a duplicate of this question, but I don't understand the answer. I think it is flawed, because this query:
session.query(Base).join(Base.owner).order_by(Player.name)
results in duplicate joins:
- joins coming from relationships (lazy='joined') specified on Base class
- joins specified in the query
Base table is joined with 5 copies of Player table. This does not look too efficient!
At least this is the way it seems to work in SQL Alchemy 0.9.1.
Does anyone have a better answer to that question?