title: SQLAlchemy querying for Parent's multiple Children returns [(bool, bool)]
body: <p>Consider the following <code>SQLAlchemy</code> data model:</p>
  
  <pre><code>class Parent:
      @declared_attr
      def child_A_id(cls):
          return Column(ForeignKey(Child.id), nullable=True)
  
      @declared_attr
      def child_B_id(cls):
          return Column(ForeignKey(Unit.id), nullable=True)
  
      @declared_attr
      def child_A(cls):
          return relationship(Child, primaryjoin=lambda: cls.child_A_id == Child.id)
  
      @declared_attr
      def child_B(cls):
          return relationship(Child, primaryjoin=lambda: cls.child_A_id == Child.id)
  </code></pre>
  
  <p>I am trying to query for both the <code>child_A</code> and <code>child_B</code> object using the following query:</p>
  
  <pre><code>session.query(Parent.child_A, Parent.child_B).limit(1).all()
  </code></pre>
  
  <p>which just returns a bool instead of an object (e.g. <code>[(False, False)]</code> instead of <code>[{child_A_columns}, {child_B_columns}]</code>.</p>
  
  <p>I looked at <a href="https://stackoverflow.com/questions/33428411/sqlalchemy-column-properties-and-relationships-return-booleans">SQLAlchemy column-properties and relationships return booleans</a> which solves this problem for one <code>child</code> but can't figure out how to apply it for this case where one <code>Parent</code> has two <code>child</code> relationships to the same table.</p>
  
  <hr>
  
  <p>Attempted solutions:</p>
  
  <pre><code>parent = session.query(Parent).limit(1).all()
  parent.child_A
  parent.child_B
  </code></pre>
  
  <p>Works but requires a <code>SELECT *</code> which I am trying to avoid.</p>
  
  <pre><code>session.query(Parent.child_A, Parent.child_B).with_entity(Child).limit(1).all()
  </code></pre>
  
  <p>only returns one <code>Child</code>.</p>