title: How to retrieve data from tables with relationships - Many To Many (SQLAlchemy)?
body: <p>I have two models with a many to many relationship (SQLAlchemy):</p>
  
  <pre><code>association_table = Table('association', Base.metadata,
      Column('left_id', Integer, ForeignKey('left.id')),
      Column('right_id', Integer, ForeignKey('right.id'))
  )
  
  class Parent(Base):
      __tablename__ = 'left'
      id = Column(Integer, primary_key=True)
      children = relationship("Child",
                      secondary="association",
                      backref="parents")
  
  class Child(Base):
      __tablename__ = 'right'
      id = Column(Integer, primary_key=True)
  </code></pre>
  
  <p>Get "all parents of one (second on the list) the child" I can that way:</p>
  
  <pre><code>parents = session.query(Parent).filter(Parent.children.any(id=2))
  </code></pre>
  
  <p>And how to get "all the children of a parent"?</p>