[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

[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 = MainUser.id

[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

[sqlalchemy] Re: ForeignKey + schema

2007-09-14 Thread Rick Morrison
> Im not sure about creation, but I've not had any problems using > cross-schema foreign keys, relations, joins and so forth using > SQLAlchemy 0.3 and PostgreSQL. ..and of course the test case I wrote up to show the problem worked fine. Turns out the issue was in the PK declaration for the table

[sqlalchemy] Re: ForeignKey + schema

2007-09-14 Thread Neil Blakey-Milner
On 9/13/07, Rick Morrison <[EMAIL PROTECTED]> wrote: > SA 0.3* doesn't seem to handle relationships between tables in different > schemas very well: it seems to think that > > schema.A -> public.B > >is: > > schema.A -> schema.B > > and even specifying "primaryjoin=" in the mapper won