diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-07-21 12:36:20 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-07-21 12:36:20 -0400 |
commit | 30ec982ba697eb320d804164c6bc965ae239abe8 (patch) | |
tree | 5250f2b709e9771543e208ef759cc5671ee397a3 /lib/sqlalchemy/sql | |
parent | 547e959157f841f4f6d1e405ceed14755fcbd0bd (diff) | |
download | sqlalchemy-30ec982ba697eb320d804164c6bc965ae239abe8.tar.gz |
Allow Grouping to pass along proxy_set of element
Repaired an issue where the "ORDER BY" clause rendering a label name rather
than a complete expression, which is particularly important for SQL Server,
would fail to occur if the expression were enclosed in a parenthesized
grouping in some cases. This case has been added to test support.
Fixes: #5470
Change-Id: Ie0e27c39e5d53be78b32f7810f93d2d0536375e7
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r-- | lib/sqlalchemy/sql/elements.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index c7e5aabcc..ca73a4392 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -3714,6 +3714,13 @@ class Grouping(GroupedElement, ColumnElement): return getattr(self.element, "_label", None) or self.anon_label @property + def _proxies(self): + if isinstance(self.element, ColumnElement): + return [self.element] + else: + return [] + + @property def _from_objects(self): return self.element._from_objects |