title: sqlalchemy joinedload: syntax to load multiple relationships more than 1 degree separated from query table?
body: <p>Is there a more concise syntax for using sqlalchemy <a href="https://docs.sqlalchemy.org/en/13/orm/loading_relationships.html#sqlalchemy.orm.joinedload" rel="noreferrer"><code>joinedload</code></a> to eager load items from more than one table that only relates to the query table by way of another intermediate table (or is there an alternative load syntax that is better for what I am trying to do)?</p>
  
  <p>For example, using the familiar data structure of questions, answers, etc, is there a more succinct way than the example below to query a question, eager load the related answers, and eager load both the answer comments and the answer votes (assume, for this example, that both of these answer related items are contained in separate tables)?     </p>
  
  <pre><code>from sqlalchemy.orm import joinedload
  
  result = session.query(Question).\
      options(
         joinedload(Question.answers).
         joinedload(Answer.comments)
         ).\
      options(
         joinedload(Question.answers).
         joinedload(Answer.votes)
         ).\
      filter(Question.id == '1').\
      first()
  </code></pre>
  
  <p>I could not find any examples of loading multiple tables by way of an intermediate table at <a href="http://docs.sqlalchemy.org/en/latest/orm/loading_relationships.html" rel="noreferrer">Relationship Loading Techniques</a> (or anywhere else for that matter). I did attempt to include multiple sub-relationships inside a single <code>joinedload</code> like...</p>
  
  <pre><code>result = session.query(Question).\
      options(joinedload(Question.answers, Answer.comments, Answer.votes)).\
      filter(Question.id == '1').\
      first()
  </code></pre>
  
  <p>...but that approach, not surprisingly, just chains the joins.</p>