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
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
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
> 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
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