summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-01-27 11:23:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-01-27 11:23:59 -0500
commite26b28224d7c1745a8a2892372e1f5a8862e792c (patch)
tree6598b8cbd336c1901538974a92dbaa823e822b09 /lib/sqlalchemy/schema.py
parent8ca42e38b3cec03298844b6634b16363673bf825 (diff)
downloadsqlalchemy-e26b28224d7c1745a8a2892372e1f5a8862e792c.tar.gz
Fixed bug where :meth:`.Table.tometadata` would fail if a
:class:`.Column` had both a foreign key as well as an alternate ".key" name for the column. Also in 0.7.10. [ticket:2643]
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r--lib/sqlalchemy/schema.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index 3e8f4ea82..b9ee55abf 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -2280,7 +2280,7 @@ class ForeignKeyConstraint(Constraint):
def copy(self, schema=None, **kw):
fkc = ForeignKeyConstraint(
- [x.parent.name for x in self._elements.values()],
+ [x.parent.key for x in self._elements.values()],
[x._get_colspec(schema=schema) for x in self._elements.values()],
name=self.name,
onupdate=self.onupdate,