> -----Original Message-----
> From: sqlalchemy@googlegroups.com 
> [mailto:sqlalch...@googlegroups.com] On Behalf Of Luke Arno
> Sent: 14 October 2009 16:41
> To: sqlalchemy@googlegroups.com
> Subject: [sqlalchemy] Re: ORM Many to Many Across Two Databases
> 
> It looks like if I put the relation on the obj mapped to the DB where 
> the association table is _not_, it works in one direction. 
> (So, in the 
> example Right.lefts can work but Left.rights cannot.) When trying to 
> use Left.rights, it looks for the table in the wrong database.
> 
> It appears that it would be fine if I could just get the 
> table names all
> qualified with database name in the issued SQL. Is there a way to 
> make that happen, by any chance?
> 

You can do this by using a single engine and metadata, and passing a
'schema' parameter when defining your tables:

http://www.sqlalchemy.org/docs/05/metadata.html#specifying-the-schema-na
me

Hope that helps,

Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to