From 6397a4ff4bce537487a3b30552622544868da9a0 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 12 Nov 2012 15:48:40 -0500 Subject: 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] --- lib/sqlalchemy/sql/expression.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/sql/expression.py') 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): -- cgit v1.2.1