summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-07-30 12:12:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-07-30 12:12:32 -0400
commitde0e2724c5a85586e98f524bba85b69e3ae6a21e (patch)
treef79df2135ac6a4734e35cd296670730f6c9db62f /lib/sqlalchemy
parenta45da117889edba7ec0906d3af3fff7d83e5373a (diff)
downloadsqlalchemy-de0e2724c5a85586e98f524bba85b69e3ae6a21e.tar.gz
- Fixed bug where query.join() + aliased=True
from a joined-inh structure to itself on relationship() with join condition on the child table would convert the lead entity into the joined one inappropriately. [ticket:2234] Also in 0.6.9.
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index a3b13abb2..d9c67d56c 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -1535,7 +1535,7 @@ class Query(object):
# which is intended to wrap a the right side in a subquery,
# ensure that columns retrieved from this target in the result
# set are also adapted.
- if aliased_entity:
+ if aliased_entity and not create_aliases:
self.__mapper_loads_polymorphically_with(
right_mapper,
ORMAdapter(