[sqlalchemy] Re: multiple tables for only one schema ...?

2009-05-30 Thread sbard
thank's a lot ! it work's i had the class object to globals() for using the object when i load my module === def add_a_table(tablename): ClasseTable = DeclarativeMeta(Part_%s%tablename, (BaseTest,),

[sqlalchemy] Re: multiple tables for only one schema ...?

2009-05-29 Thread sbard
On 28 mai, 17:54, Michael Bayer mike...@zzzcomputing.com wrote: sbard wrote: hello, i've got a database with one table per country. for example :    part_es (for spain)    part_uk ()    part_it each tables have got the same schema (id, libel, description, part_numer)

[sqlalchemy] Re: multiple tables for only one schema ...?

2009-05-29 Thread Michael Bayer
you need to also specify the desired columns: return DeclarativeMeta(%sMyBase%tablename, (BaseTest,), { '__tablename__':tablename, 'id':Column('id', Integer, primary_key=True), 'stuff':Column('stuff', String(20)) }) sbard wrote:

[sqlalchemy] Re: multiple tables for only one schema ...?

2009-05-28 Thread Michael Bayer
sbard wrote: hello, i've got a database with one table per country. for example : part_es (for spain) part_uk () part_it each tables have got the same schema (id, libel, description, part_numer) same __init__ method same __repr__ method is there an easy way to avoid