diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-03 20:58:04 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-01-03 20:58:04 +0000 |
| commit | e38962d1e97c08356320e26cc619d460fff607fb (patch) | |
| tree | ac1b60db544566e67b45128d91a1ee84560f4659 /lib/sqlalchemy/sql | |
| parent | 9be9e473c535d5ea9fa2c55766cdfb47012af8df (diff) | |
| download | sqlalchemy-e38962d1e97c08356320e26cc619d460fff607fb.tar.gz | |
- merge of trunk r6611
- Fixed a column arithmetic bug that affected column
correspondence for cloned selectables which contain
free-standing column expressions. This bug is
generally only noticeable when exercising newer
ORM behavior only availble in 0.6 via [ticket:1568],
but is more correct at the SQL expression level
as well. [ticket:1617]
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 2341cf79c..c9ef37c8b 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -1843,7 +1843,8 @@ class FromClause(Selectable): target_set = column.proxy_set cols = self.c for c in cols: - i = c.proxy_set.intersection(target_set) + i = target_set.intersection(itertools.chain(*[p._cloned_set for p in c.proxy_set])) + if i and \ (not require_embedded or c.proxy_set.issuperset(target_set)): |
