summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/schema.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-29 17:47:59 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-29 17:47:59 -0500
commit0536c48dafb670d34fc96d26078b41ed6accf01f (patch)
treeb3109ed91ac61e5ddbe8c77c5a1e0bf3e08c0f51 /lib/sqlalchemy/schema.py
parentcd655cf0996de682365201a0184170256da6859b (diff)
downloadsqlalchemy-0536c48dafb670d34fc96d26078b41ed6accf01f.tar.gz
- expand the check to determine if a selectable column is embedded
in the corresponding selectable to take into account clones of the target column. fixes [ticket:2419] - have _make_proxy() copy out the _is_clone_of attribute on the new column so that even more corresponding_column() checks work as expected for cloned elements. - add a new test fixture so that mapped tests can be specified using declarative.
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r--lib/sqlalchemy/schema.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py
index 3ae0053c3..154e18e5f 100644
--- a/lib/sqlalchemy/schema.py
+++ b/lib/sqlalchemy/schema.py
@@ -1122,6 +1122,8 @@ class Column(SchemaItem, expression.ColumnClause):
c.table = selectable
selectable._columns.add(c)
+ if selectable._is_clone_of is not None:
+ c._is_clone_of = selectable._is_clone_of.columns[c.name]
if self.primary_key:
selectable.primary_key.add(c)
c.dispatch.after_parent_attach(c, selectable)