diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-18 19:34:32 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-18 21:47:46 -0400 |
commit | c1c999c01d595b74fe178d9bdbff34fd8939a283 (patch) | |
tree | 7b6c7d0395096c29b43fcbbe6c4c5f8a7138daf8 /lib/sqlalchemy/orm/context.py | |
parent | d0812a1abf903f6b5f1a0bfb19f8c87a665f8309 (diff) | |
download | sqlalchemy-c1c999c01d595b74fe178d9bdbff34fd8939a283.tar.gz |
Ensure ClauseAdapter treats FunctionElement as a ColumnElement
Fixed regression where use of an unnamed SQL expression such as a SQL
function would raise a column targeting error if the query itself were
using joinedload for an entity and was also being wrapped in a subquery by
the joinedload eager loading process.
Fixes: #6086
Change-Id: I22cf4d6974685267c4f903bd7639be8271c6c1ef
Diffstat (limited to 'lib/sqlalchemy/orm/context.py')
-rw-r--r-- | lib/sqlalchemy/orm/context.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/context.py b/lib/sqlalchemy/orm/context.py index 9cfa0fdc6..e440ee161 100644 --- a/lib/sqlalchemy/orm/context.py +++ b/lib/sqlalchemy/orm/context.py @@ -2707,7 +2707,9 @@ class _ORMColumnEntity(_ColumnEntity): compile_state._entities.append(self) compile_state._has_orm_entities = True + self.column = column + self._fetch_column = self._row_processor = None self._extra_entities = (self.expr, self.column) |