diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-29 10:40:00 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-29 10:41:07 -0400 |
commit | 28493bf4bc35a4802b57b02a8b389cec7b6dcbb6 (patch) | |
tree | 018e876612cf5885f60e41434a5112134225a5a8 /lib/sqlalchemy/orm/attributes.py | |
parent | 9e3ef9bcf0a41bfacc4e6e836a45ed4d89c7c0fe (diff) | |
download | sqlalchemy-28493bf4bc35a4802b57b02a8b389cec7b6dcbb6.tar.gz |
accommodate HasEntityNamespace in context.all_selected_columns
Fixed regression in hybrid_property where a hybrid against a SQL function
would generate an ``AttributeError`` when attempting to generate an entry
for the ``.c`` collection of a subquery in some cases; among other things
this would impact its use in cases like that of ``Query.count()``.
Fixes: #6401
Change-Id: Icc243c699e9a5c88448076c6427ec389eaa8b8ed
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index b8974196c..2f8c8f940 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -483,6 +483,7 @@ class InstrumentedAttribute(Mapped): HasEntityNamespace = util.namedtuple( "HasEntityNamespace", ["entity_namespace"] ) +HasEntityNamespace.is_mapper = HasEntityNamespace.is_aliased_class = False def create_proxied_attribute(descriptor): |