diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-02-11 14:05:49 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-02-12 18:58:53 -0500 |
commit | 1d2b49bc991ca866fd71da3ccfbcde5093482512 (patch) | |
tree | 45d83e2a1ae0b4356670f2600e8f3b34d0776911 /lib/sqlalchemy/orm/attributes.py | |
parent | 4aa0c7ae76894048c5c30c89c403c7cbf5d844ff (diff) | |
download | sqlalchemy-1d2b49bc991ca866fd71da3ccfbcde5093482512.tar.gz |
Further refine labeling for renamed columns
Forked from I22f6cf0f0b3360e55299cdcb2452cead2b2458ea
we are attempting to decide the case for columns mapped
under a different name. since the .key feature of
Column seems to support this fully, see if an annotation
can be used to indicate an effective .key for a column.
The effective change is that the labeling of column expressions
in rows has been improved to retain the original name of the ORM
attribute even if used in a subquery.
References: #5933
Change-Id: If251f556f7d723f50d349f765f1690d6c679d2ef
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index dd354c4e0..b96b3b61e 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -212,7 +212,7 @@ class QueryableAttribute( """ return self.comparator.__clause_element__()._annotate( - {"orm_key": self.key, "entity_namespace": self._entity_namespace} + {"proxy_key": self.key, "entity_namespace": self._entity_namespace} ) @property |