- properties={
- "object_id": synonym(safe_name + '_id'),
- "language": relation(
- Language,
- primaryjoin=table.c.language_id == Language.id,
- ),
- },
- )
+ properties={
+ "object_id": synonym(safe_name + '_id'),
+ "language": relation(Language,
+ primaryjoin=table.c.language_id == Language.id,
+ ),
+ safe_name: relation(object_table,
+ primaryjoin=(object_table.id == table.c[safe_name + "_id"]),
+ backref=backref(name_plural,
+ collection_class=attribute_mapped_collection('language'),
+ lazy=lazy,
+ ),
+ ),
+ },
+ )