> make a mapper() decorator that does the accounting you want.
>
> from sqlalchemy.orm import mapper as _mapper
>
> my_table_registry = {}
> def mapper(cls, table, *args, **kwargs):
> my_table_registry[(table.name, table.schema)] = cls
> return _mapper(cls, table, *args, **kwargs)
>
> def my_method(table_name, schema_name):
> return my_table_registry[(table_name, schema_name)]
Thanks!!!! that is the solution! now i understand why python is called
python :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---