Hi!

I have a database with foreign keys in tables not in the default
schema. when reflecting these tables, sqlalchemy only looks in the
default schema for the fk tables, so it can't find them. is there a
way to tell sqlalchemy to look for fk tables in another schema than
the default?

i.e. I have a database with schema A and schema B, A is the default
schema. In B I have defined Ba and Bb. Ba has a foreign key to Bb.
When doing sqlalchemy.Table("Ba", metadata, autoload = True, schema =
"B") I get NoSuchTableError: Bb

Is this a bug or am I missing something?

I have written a patch that fixes the problem for me, probably not the
best way to fix the problem, but I don't know much about SQLAlchemy
internals to do it nicely. Any suggestions on how to fix this
properly?

-- Joakim Lundborg

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

Attachment: fk_non-default_schema_reflection
Description: Binary data

Reply via email to