- attached FileComparisonDiffReport.txt
Oracle foreign key reflection broken when multiple tables named ParentTable
In Oracle, when child_tbl contains a foreign key constraint to parent_tbl, and there are multiple tables named parent_tbl (in various schemas) that are visible (SELECT privilege) to the connecting user account, then autoload of child_tbl will throw the exception
There are multiple tables with name child_tbl in the schema, you must specifie owner
(not a strictly accurate message; the multiple tables are not in the schema, they are simply visible to the schema.)
The problem arises because, at line 283 in oracle.py, in schema.Table(remote_table, table.metadata, autoload=True, autoload_with=connection)
no ownership data is used to instantiate. This ownership data is easily available, however, by adding one more column (rem.owner) to constraintSQL, and passing that data into Table().
Comments (5)
-
Account Deleted -
Account Deleted - attached patchtest.py
test case (python portion, run after .sql)
-
Account Deleted - attached testcase.sql
Data definitions - run in Oracle before running patchtest.py
-
repo owner - changed status to resolved
patched this in changeset:2107, fixed my typo in changeset:2108. existing unit tests pass. im using Oracle XE and i cant locate the admin PW for it right now so ill take your word that this particular test works also. thanks for the patch !
-
repo owner - removed milestone
Removing milestone: 0.3.2 (automated comment)
- Log in to comment
patch