From 95b10c4e8e59cf2509ba5d90a03341d74f93d164 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 25 May 2014 13:45:32 -0400 Subject: - Fixed bug in subquery eager loading where a long chain of eager loads across a polymorphic-subclass boundary in conjunction with polymorphic loading would fail to locate the subclass-link in the chain, erroring out with a missing property name on an :class:`.AliasedClass`. fixes #3055 --- lib/sqlalchemy/orm/strategies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/orm/strategies.py b/lib/sqlalchemy/orm/strategies.py index 3ebadd62b..c8946a0c0 100644 --- a/lib/sqlalchemy/orm/strategies.py +++ b/lib/sqlalchemy/orm/strategies.py @@ -885,7 +885,7 @@ class SubqueryLoader(AbstractRelationshipLoader): attr = getattr(parent_alias, key).\ of_type(effective_entity) else: - attr = key + attr = getattr(mapper.entity, key) if second_to_last: q = q.join(parent_alias, attr, from_joinpoint=True) -- cgit v1.2.1