In mssql, autoloading a table with FKs doesn't load the referenced table
When I reflect a table with FKs, it comes in OK, and the metadata seems to know about the FK, but eval'ing 'referenced_table' in meta.tables (as in the example) returns False.
Also, reflecting the referenced table without the autoload=True parameter doesn't work -- the table I get is empty (but it does come in OK if I use autoload).
I also tried using meta.table_iterator, and got a message like "Could not find table xxx with which to generate a foreign key". The table its asking for is indeed referenced, and if I autoload it (and all the other referenced tables), the iterator works fine.
This seems to be mssql-specific. I've tried it with MySql, and it works OK.
Comments (2)
-
Account Deleted -
Account Deleted - changed status to resolved
(original author: ram) Seems to work, committed in c096aeefe04ff77dbbef084923c75bf928620a27.
- Log in to comment
(original author: ram) Posted a trial patch to the -user list, let's see how that shakes out.