diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-15 00:50:17 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-09-15 00:54:15 -0400 |
| commit | 25804aeae262fa01256dbd2f045ad4a380644f66 (patch) | |
| tree | 9016ee540e1b1ca9d4b4c6e20f9d6517e37047df /lib/sqlalchemy/sql | |
| parent | 6e1f34ed6230d7fce338ee4fb022678a7e511627 (diff) | |
| download | sqlalchemy-25804aeae262fa01256dbd2f045ad4a380644f66.tar.gz | |
Repair foreign_keys population for Join._refresh_for_new_column
Fixed bug where setting up a single-table inh subclass of a joined-table
subclass which included an extra column would corrupt the foreign keys
collection of the mapped table, thereby interfering with the
initialization of relationships.
Change-Id: I04a0cf98fd456d12d5a5b9e77a46a01246969a63
Fixes: #3797
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index 11ef99f09..43aff7caa 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -905,7 +905,7 @@ class Join(FromClause): if col is not None: if self._cols_populated: self._columns[col._label] = col - self.foreign_keys.add(col) + self.foreign_keys.update(col.foreign_keys) if col.primary_key: self.primary_key.add(col) return col |
