summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-08-12 23:35:40 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2016-08-12 23:35:40 -0400
commitb07eb3cb45d1a344759a2eee9d2166fbf3e44888 (patch)
tree1c3b8a491e7fede02073fd48bb40ae97c77441b6 /lib/sqlalchemy
parentbec5d6991e4eacdba3529ea71d30bb7fd614fdc9 (diff)
downloadsqlalchemy-b07eb3cb45d1a344759a2eee9d2166fbf3e44888.tar.gz
Ensure final link in subqueryload join is correct
Fixed bug in subquery eager loading where a subqueryload of an "of_type()" object linked to a second subqueryload of a plain mapped class would fail to link the joins correctly. Change-Id: I4be89e6f5e492438464a2ded01eb9c84d7ff7d4e Fixes: #3773
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/strategies.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py
index 826073215..1d0058ca2 100644
--- a/lib/sqlalchemy/orm/strategies.py
+++ b/lib/sqlalchemy/orm/strategies.py
@@ -968,7 +968,7 @@ class SubqueryLoader(AbstractRelationshipLoader):
if last and effective_entity is not self.mapper:
attr = attr.of_type(effective_entity)
else:
- if last and effective_entity is not self.mapper:
+ if last:
attr = getattr(parent_alias, key).\
of_type(effective_entity)
else: