title: Bidirectional many-to-many attribute_mapped_collection, sqlalchemy
body: <p>I have 2 classes as a many to many relationship A and B, shortened to show the basic relationship here:</p>
  
  <pre><code>class A(Base):
  
      bclss = relationship("B",
                            backref = "aclss",
                            secondary = "a_b_association",
                            collection_class = attribute_mapped_collection('identifier'))   
  
      a_b_association_table = Table('a_b_association', Base.metadata,
                               Column('a_id', Integer, ForeignKey('a.id')),
                               Column('b_id', Integer, ForeignKey('b.id')) )
  </code></pre>
  
  <p>So instances of A can add instances of B, and be referenced in a dictionary keyed by identifier...however B instances only contain a [list] of their a objects, and I would like a mirrored interface, to pull out a instances related to b instances by an identifier key in a dictionary. Mirroring the relationship statement on b and referencing the same association table does not work, so I'm thinking into an area I don't exactly know how to implement in sqlalchemy yet.</p>
  
  <p>So, even if this isn't 100% clear, my question is this:</p>
  
  <p>How to get a dictionary, attribute mapped collection on two items related in many to many relationship where each side can pull by dictionary key the related items instead of what I am getting: an asymetrical one side dictionary/other side list interface.</p>