RE: [sqlalchemy] m2m introspection

2013-12-09 Thread Alexey Vihorev
] On Behalf Of Michael Bayer Sent: Sunday, December 08, 2013 10:47 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] m2m introspection with modern sqlalchemy do this: from sqlalchemy import inspect for rel in inspect(MyClass).relationships: target_class = rel.mapper.class_

Re: [sqlalchemy] m2m introspection

2013-12-08 Thread Michael Bayer
with modern sqlalchemy do this: from sqlalchemy import inspect for rel in inspect(MyClass).relationships: target_class = rel.mapper.class_ this stuff is all documented, though it involves familiarizing with a few basic constructs like Mapper and RelationshipProperty: