From: Mike Bayer Date: Sun, 29 Apr 2007 21:16:12 +0000 (+0000) Subject: added orig_set colleciton to Select when its declared as a scalar, to allow X-Git-Tag: rel_0_3_7~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05f1e509518f62d2cdf8cc697e5bf6d4108df432;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git added orig_set colleciton to Select when its declared as a scalar, to allow corresponding_column() to return a result --- diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py index cfe571a686..988366617f 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: