

@classmethod
def setup_mappers(cls):
    (KeywordAssociation, Item, Keyword) = (cls.classes.KeywordAssociation, cls.classes.Item, cls.classes.Keyword)
    (items, item_keywords, keywords) = cls.tables.get_all('items', 'item_keywords', 'keywords')
    mapper(Keyword, keywords)
    mapper(KeywordAssociation, item_keywords, properties={
        'keyword': relationship(keywords, lazy='joined'),
    }, primary_key=[item_keywords.c.item_id, item_keywords.c.keyword_id])
    mapper(Item, items, properties={
        'keywords': relationship(KeywordAssociation, order_by=item_keywords.c.data, cascade='all, delete-orphan'),
    })

dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_association.py AssociationTest.setup_mappers/VarMisuse@83/110 `Keyword`->`keywords`