] 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_
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: