summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/expression.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-11-12 15:48:40 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-11-12 15:48:40 -0500
commit6397a4ff4bce537487a3b30552622544868da9a0 (patch)
treeec7e985ee344749c47bd8a1f5e44c3851713960f /lib/sqlalchemy/sql/expression.py
parent37c943233a4b01428cf4b67d766d2685309ab0e8 (diff)
downloadsqlalchemy-6397a4ff4bce537487a3b30552622544868da9a0.tar.gz
Fixed bug in type_coerce() whereby typing information
could be lost if the statement were used as a subquery inside of another statement, as well as other similar situations. Among other things, would cause typing information to be lost when the Oracle/mssql dialects would apply limit/offset wrappings. [ticket:2603]
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
-rw-r--r--lib/sqlalchemy/sql/expression.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py
index 91f10cf3c..1d3be7de1 100644
--- a/lib/sqlalchemy/sql/expression.py
+++ b/lib/sqlalchemy/sql/expression.py
@@ -4256,6 +4256,8 @@ class Label(ColumnElement):
e = self.element._make_proxy(selectable,
name=name if name else self.name)
e._proxies.append(self)
+ if self._type is not None:
+ e.type = self._type
return e
class ColumnClause(Immutable, ColumnElement):