summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-04-30 13:59:39 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-04-30 13:59:39 +0000
commit6cd83d10b15b1d88748eff6829014aea10c3a0b3 (patch)
tree79877223a47de6d6d18be857aa2903ee25d491bf
parent39947e1f5d131775e7beef7773d9905706dced64 (diff)
downloadsqlalchemy-6cd83d10b15b1d88748eff6829014aea10c3a0b3.tar.gz
- small fix to SelectResultsExt to not bypass itself during
select().
-rw-r--r--CHANGES4
-rw-r--r--lib/sqlalchemy/ext/selectresults.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index c07e53916..fce91bcb6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+-extensions
+ - small fix to SelectResultsExt to not bypass itself during
+ select().
+
0.3.7
- engines
- warnings module used for issuing warnings (instead of logging)
diff --git a/lib/sqlalchemy/ext/selectresults.py b/lib/sqlalchemy/ext/selectresults.py
index ec3ad8026..68538f3cb 100644
--- a/lib/sqlalchemy/ext/selectresults.py
+++ b/lib/sqlalchemy/ext/selectresults.py
@@ -7,7 +7,7 @@ class SelectResultsExt(orm.MapperExtension):
def select_by(self, query, *args, **params):
return SelectResults(query, query.join_by(*args, **params))
def select(self, query, arg=None, **kwargs):
- if hasattr(arg, '_selectable'):
+ if isinstance(arg, sql.FromClause) and arg.supports_execution():
return orm.EXT_PASS
else:
return SelectResults(query, arg, ops=kwargs)