diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2021-03-24 19:30:06 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-03-24 19:30:06 +0000 |
| commit | 53d928746ad4bfecb36841c59eeeb95eb115c5cd (patch) | |
| tree | 3c31bec2c6f9c7e6bb724b19a2f4a452ddd8edfe /lib/sqlalchemy | |
| parent | 218177c4d60c5c4ab0524a0ab347e1c711458e3c (diff) | |
| parent | 0bf04029dcdd912a1e5a4cdac1cccf14b60b3ec9 (diff) | |
| download | sqlalchemy-53d928746ad4bfecb36841c59eeeb95eb115c5cd.tar.gz | |
Merge "Support __visit_name__ on PropComparator to work in cloning"
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/attributes.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 2 |
2 files changed, 6 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_, diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index a660d7e1a..e2cc36999 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -393,6 +393,8 @@ class PropComparator(operators.ColumnOperators): __slots__ = "prop", "property", "_parententity", "_adapt_to_entity" + __visit_name__ = "orm_prop_comparator" + def __init__( self, prop, # type: MapperProperty |
