Support for autoloading synonyms in Oracle

Issue #379 resolved
Former user created an issue

Currently, tables can't be autoloaded by referring to their synonyms in Oracle.

If I CREATE SYNONYM synonymname FOR tablename (in SQL), then try to refer to it from SA:

Table('synonymname', metadata, autoload=True) gives sqlalchemy.exceptions.NoSuchTableError: synonymname

I've created a patch for oracle.py that fixes this. It also allows use of synonyms even when the synonym refers to an object accessed through a database link. This is, incidentally, the only way to autoload tables through a database link (the reason I started on the problem in the first place).

Comments (10)

  1. Former user Account Deleted

    Oops - please use diff.2.txt and test.2.py instead of diff.txt and test.py - as a guest account, I can't overwrite or remove earlier uploads

  2. Mike Bayer repo owner

    ive submitted a modified patch in changeset:2335. all existing reflection tests pass, and i can get most of your new tests to pass except for the ones involving DBLINK, since I cant get the DBLINK working correctly on my oracle-xe system. re-open the ticket if the DBLINK examples still arent working. also im wondering if theres a good way to integrate your tests with the unit test suite but since it requires DBA access im not sure how practical it is.

  3. Log in to comment