]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
bugfix: preserving remote_owner during reflecttable setup of referential integrity
authorCatherine Devlin <catherine.devlin@gmail.com>
Thu, 20 Mar 2008 00:44:01 +0000 (00:44 +0000)
committerCatherine Devlin <catherine.devlin@gmail.com>
Thu, 20 Mar 2008 00:44:01 +0000 (00:44 +0000)
lib/sqlalchemy/databases/oracle.py

index 23c159ef7d6750f7684d538eb171d34a35b0fb73..fc35df2bb74c49cf7fae908a080fe4b9bbc7972f 100644 (file)
@@ -555,7 +555,7 @@ class OracleDialect(default.DefaultDialect):
                          "all_cons_columns%(dblink)s - does the user have "
                          "proper rights to the table?") % {'dblink':dblink})
                     continue
-                refspec = ".".join([remote_table, remote_column])
+                refspec = ".".join(x for x in [remote_owner, remote_table, remote_column] if x)                
                 schema.Table(remote_table, table.metadata, autoload=True, autoload_with=connection, owner=remote_owner)
                 if local_column not in fk[0]:
                     fk[0].append(local_column)