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/util.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/util.py')
-rw-r--r-- | lib/sqlalchemy/orm/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index 66cb2a319..6d3869679 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -530,7 +530,7 @@ class AliasedInsp(InspectionAttr): def _adapt_element(self, elem): return self._adapter.traverse(elem).\ _annotate({ - 'parententity': self.entity, + 'parententity': self, 'parentmapper': self.mapper} ) |