diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-04 15:57:08 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-04 15:57:08 -0500 |
commit | df9e3f2fb9804486e2e95bff2f4d2b52fff776c2 (patch) | |
tree | 5497d7a33b2de1580a7d7d2ed4b96934b67a508a /lib/sqlalchemy/schema.py | |
parent | cf41a6a04116f2ca40771aa1d69b81fd67b918f0 (diff) | |
download | sqlalchemy-df9e3f2fb9804486e2e95bff2f4d2b52fff776c2.tar.gz |
- reflection process always resets the primary key constraint
first, fixes extend_existing
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r-- | lib/sqlalchemy/schema.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index b5b057625..496d8e652 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -357,6 +357,9 @@ class Table(SchemaItem, expression.TableClause): self._init_items(*args) def _autoload(self, metadata, autoload_with, include_columns): + if self.primary_key.columns: + PrimaryKeyConstraint()._set_parent_with_dispatch(self) + if autoload_with: autoload_with.run_callable( autoload_with.dialect.reflecttable, |