diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-06-27 00:40:34 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-06-27 00:40:34 -0400 |
| commit | fcb7c784e9479b9bff7de20c41a05bc1aa550ffb (patch) | |
| tree | 31069380bd348fce6b2b71d6e5330fe65f231e6f /lib/sqlalchemy/orm/interfaces.py | |
| parent | 012b3bd0b2a0e9cdfd11d797b6aa0053a13816b0 (diff) | |
| download | sqlalchemy-fcb7c784e9479b9bff7de20c41a05bc1aa550ffb.tar.gz | |
- Fixed 1.0 regression where the "parent entity" of a synonym-
mapped attribute on top of an :func:`.aliased` object would
resolve to the original mapper, not the :func:`.aliased`
version of it, thereby causing problems for a :class:`.Query`
that relies on this attribute (e.g. it's the only representative
attribute given in the constructor) to figure out the correct FROM
clause for the query.
fixes #3466
- apply consitency to ._parententity vs.
__clause_element__()._annotations['parententity']
in terms of aliased class, test it all.
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
| -rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 6cc613baa..cd4a0116d 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -338,7 +338,7 @@ class PropComparator(operators.ColumnOperators): def __init__(self, prop, parentmapper, adapt_to_entity=None): self.prop = self.property = prop - self._parententity = parentmapper + self._parententity = adapt_to_entity or parentmapper self._adapt_to_entity = adapt_to_entity def __clause_element__(self): |
