Alexandre da Silva wrote:
> 
> I am already trying go get the list of mapped tables. I currently got a
> list from sqlalchemy.org.mapper from the weakref "mapper_registry", but
> I don't know if that values are useful for my context.
what u need?
all tables? see metadata.
all mappers? see the mapper_registry
the relations inbetween? u have to dig the individual mappers, walk the 
polymorphisms and inheritances.

> I also have another question, I have some way to access the mapped class
> from the table object?
probably no, the relation is directional in the other way,. mapper->table; 
one may have many mappers linked in a way or another to same table.
i'm not sure if u can have 2 separate clasess with 2 primary mappers using 
same table - probably can.


and, why u need all this?


> something like:
> 
> user_table = Table(...)
> 
> class User(object)
>       pass
> 
> mapper(User, user_table)
> 
> I have some method like user_table.getclass? or another way to get it
> from orm?
> 
> thank's for help
> 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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