[sqlalchemy] Find related classes

2010-08-21 Thread simon
Hi all, For a given declaratively mapped class in SA 0.6, how do I programmatically find out all other mapped classes forming a many-to- one or many-to-many relationship with it? I know I can ask a table object for all its foreign keys, but the information whether it forms a many-to-one or a

Re: [sqlalchemy] Find related classes

2010-08-21 Thread Michael Bayer
On Aug 21, 2010, at 12:05 PM, simon wrote: Hi all, For a given declaratively mapped class in SA 0.6, how do I programmatically find out all other mapped classes forming a many-to- one or many-to-many relationship with it? I know I can ask a table object for all its foreign keys, but the