diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-24 12:15:53 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-24 14:14:04 -0400 |
commit | 0bf04029dcdd912a1e5a4cdac1cccf14b60b3ec9 (patch) | |
tree | 302a8448540699df53f6ea5d314f2f04fd57bb52 /lib/sqlalchemy/orm/attributes.py | |
parent | a22b4dfbc44c78cb4fce27c33cf74cf57878a3b1 (diff) | |
download | sqlalchemy-0bf04029dcdd912a1e5a4cdac1cccf14b60b3ec9.tar.gz |
Support __visit_name__ on PropComparator to work in cloning
Repaired support so that the :meth:`_sql.Select.params` method can work
correctly with a :class:`_sql.Select` object that includes joins across ORM
relationship structures, which is a new feature in 1.4.
Fixes: #6124
Change-Id: Ia92fc33c3acbe66910e9e3bf00af9100de19b2b8
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py index 2e48695f5..610ee2726 100644 --- a/lib/sqlalchemy/orm/attributes.py +++ b/lib/sqlalchemy/orm/attributes.py @@ -85,6 +85,10 @@ class QueryableAttribute( is_attribute = True + # PropComparator has a __visit_name__ to participate within + # traversals. Disambiguate the attribute vs. a comparator. + __visit_name__ = "orm_instrumented_attribute" + def __init__( self, class_, |