[sqlalchemy] Re: ForeignKey schema and Table schema

2009-05-08 Thread Aculeus
Sorry, I missed an example in my first message. The problem arises when you try to query across two databases: Session.query(MainUser).join((OtherUser, OtherUser.id == MainUser.id)) Would normally products something like: SELECT * FROM MainUser INNER JOIN OtherUser ON OtherUser.id =

[sqlalchemy] Re: ForeignKey schema and Table schema

2009-05-08 Thread Michael Bayer
Aculeus wrote: Sorry, I missed an example in my first message. The problem arises when you try to query across two databases: Session.query(MainUser).join((OtherUser, OtherUser.id == MainUser.id)) Would normally products something like: SELECT * FROM MainUser INNER JOIN OtherUser ON

[sqlalchemy] Re: ForeignKey schema and Table schema

2009-05-07 Thread Michael Bayer
Aculeus wrote: This has a severe problem having to hard set the schema when that value should be part of configuration. Instead the table should assume the schema of the engine that it's metadata is bound to and automatically appear in queries where there is a table from a different schema