On May 24, 9:06 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On May 24, 2007, at 11:34 AM, Eric Ongerth wrote:
> > I know how to get from a class to a table:
>
> > m = class_mapper(cls)
> > t = m.local_table
>
> > But I haven't been able to go in the other direction.
>
> theres no registry of tables-> mappers, youd have to either track
> that yourself or loop through
> sqlalchemy.orm.mapperlib.mapper_registry.values() and check the
> "mapped_table" property of each one.

Thanks to both answerers.

Have there been previous requests for table -> mapper registry?  I am
wondering if the fact that I'm looking for that functionality
indicates a need to deepen my understanding of fundamental concepts of
ORM.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to