summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-23 14:54:26 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-23 14:54:26 -0400
commit0a556d322029651be9018a1b41f13e23edf18388 (patch)
tree81190d8213cfdeff3857a47449c4373d1559823b /lib/sqlalchemy/sql/util.py
parent4475506371342b6e61d8dc236ec1ba9d7877e9e5 (diff)
downloadsqlalchemy-0a556d322029651be9018a1b41f13e23edf18388.tar.gz
- Fixed bug in Query whereby the usage of aliased() constructs
would fail if the underlying table (but not the actual alias) were referenced inside the subquery generated by q.from_self() or q.select_from().
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
-rw-r--r--lib/sqlalchemy/sql/util.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py
index 74651a9d1..d5575e0e7 100644
--- a/lib/sqlalchemy/sql/util.py
+++ b/lib/sqlalchemy/sql/util.py
@@ -579,7 +579,7 @@ class ClauseAdapter(visitors.ReplacingCloningVisitor):
return None
elif self.exclude and col in self.exclude:
return None
-
+
return self._corresponding_column(col, True)
class ColumnAdapter(ClauseAdapter):
@@ -587,11 +587,13 @@ class ColumnAdapter(ClauseAdapter):
Provides the ability to "wrap" this ClauseAdapter
around another, a columns dictionary which returns
- cached, adapted elements given an original, and an
+ adapted elements given an original, and an
adapted_row() factory.
"""
- def __init__(self, selectable, equivalents=None, chain_to=None, include=None, exclude=None, adapt_required=False):
+ def __init__(self, selectable, equivalents=None,
+ chain_to=None, include=None,
+ exclude=None, adapt_required=False):
ClauseAdapter.__init__(self, selectable, equivalents, include, exclude)
if chain_to:
self.chain(chain_to)
@@ -617,7 +619,7 @@ class ColumnAdapter(ClauseAdapter):
return locate
def _locate_col(self, col):
- c = self._corresponding_column(col, False)
+ c = self._corresponding_column(col, True)
if c is None:
c = self.adapt_clause(col)