title: SQLAlchemy - condition on join fails with AttributeError: Neither 'BinaryExpression' object nor 'Comparator' object has an attribute 'selectable'
body: <p>I'm running SQLAlchemy with Pyramid. I'm trying to run a query with a custom 'join' condition :</p>
  
  <pre><code>DBSession.query(A)\
          .outerjoin(A.b, B.a_id == A.id)\
          .all()
  </code></pre>
  
  <p>however the query fails the following error :</p>
  
  <blockquote>
    <p>AttributeError: Neither 'BinaryExpression' object nor 'Comparator' object has an attribute 'selectable'</p>
  </blockquote>
  
  <p>The problem stems from the condition, as if I remove it, the query works :</p>
  
  <pre><code>DBSession.query(A)\
          .outerjoin(A.b)\
          .all()
  </code></pre>
  
  <p>I don't understand the problem, as I follow the syntax described in <a href="http://docs.sqlalchemy.org/en/latest/orm/query.html#sqlalchemy.orm.query.Query.join" rel="nofollow noreferrer">the documentation</a> :</p>
  
  <blockquote>
    <p>q = session.query(User).join(Address, User.id==Address.user_id)</p>
  </blockquote>
  
  <p>Does anyone see what's going on ?</p>