[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] MySQL Issue: "not enough arguements for format string" error in migration

2009-05-30 Thread Rodney Haynie
(I hope this formats correctly. It seems, sometimes when I copy paste from my text editor, the email gets strung together in one line.) I have a migration problem that may be an issue in SA, SA-Migrations or MySQLdb. OK, I am narrowing the migration problem down and it looks like an issue with

[sqlalchemy] Re: orm.Query: Is there a way to build joins using relations only?

2009-05-30 Thread Michael Bayer
On May 30, 2009, at 6:57 AM, klaus wrote: > > Let's assume there is a foreign key A.fk -> B.id from table A to table > B, and these tables and columns are mapped to corresponding classes. > Then let's translate the foreign key to a reference A.ref -> B via a > relation. > > We can easily join B

[sqlalchemy] orm.Query: Is there a way to build joins using relations only?

2009-05-30 Thread klaus
Let's assume there is a foreign key A.fk -> B.id from table A to table B, and these tables and columns are mapped to corresponding classes. Then let's translate the foreign key to a reference A.ref -> B via a relation. We can easily join B onto A: session.query(A).join("ref") or session.query(A).