diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-29 21:16:12 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-29 21:16:12 +0000 |
commit | 05f1e509518f62d2cdf8cc697e5bf6d4108df432 (patch) | |
tree | 6ecee457021e850d75a151c8aeed91d8baa3b999 /lib/sqlalchemy/sql.py | |
parent | 9fc5a1fe466e6eb6ba5beb664ef7efaceef62275 (diff) | |
download | sqlalchemy-05f1e509518f62d2cdf8cc697e5bf6d4108df432.tar.gz |
added orig_set colleciton to Select when its declared as a scalar, to allow
corresponding_column() to return a result
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r-- | lib/sqlalchemy/sql.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index cfe571a68..988366617 100644 --- a/lib/sqlalchemy/sql.py +++ b/lib/sqlalchemy/sql.py @@ -2706,7 +2706,10 @@ class Select(_SelectBaseMixin, FromClause): # into the column clause of an enclosing select, and should instead # act like a single scalar column self.is_scalar = scalar - + if scalar: + # allow corresponding_column to return None + self.orig_set = [] + # indicates if this select statement, as a subquery, should automatically correlate # its FROM clause to that of an enclosing select, update, or delete statement. # note that the "correlate" method can be used to explicitly add a value to be correlated. @@ -2729,6 +2732,7 @@ class Select(_SelectBaseMixin, FromClause): self.__wherecorrelator = Select._CorrelatedVisitor(self, True) self.__fromvisitor = Select._FromVisitor(self) + self.order_by_clause = self.group_by_clause = None if columns is not None: |