On Aug 7, 2012, at 7:57 AM, Peder Chr wrote:

> But this does not work in SQL Alchemy - the trivial attempt of specifying the 
> 'schema' parameter of the 'Table' constructor as 'databasename.schemaname' 
> instead of just 'schemaname', using a DSN that does not specify a database 
> name, results in a NoSuchTableError.

this is the correct way to do it. 

NoSuchTableError is raised in specifically the case where you're trying to 
reflect an existing table (autoload=True), and its possible that when two 
tables have a foreign key dependency, reflection isn't aware that it needs to 
add this additional prefix to the FK definition.

The workaround here would be to not rely upon reflection for this use case, and 
to declare Table metadata explicitly.


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