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/sql/schema.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/sql/schema.py')
-rw-r--r-- | lib/sqlalchemy/sql/schema.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 127b12e81..6e3c9dbfb 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -1928,6 +1928,7 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause): if name_is_truncatable else (name or self.name), self.type, + # this may actually be ._proxy_key when the key is incoming key=key if key else name if name else self.key, primary_key=self.primary_key, nullable=self.nullable, |