summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-06-06 18:06:02 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-06-06 18:06:02 -0400
commit28c3325c4e18d01d7e0403229b452c8fbc345b80 (patch)
tree67576681ff561bcabeae0330bcf64c214bfe29aa /lib/sqlalchemy/orm/mapper.py
parent768108186a48a94948a7763d0f5c4dfb3f0ce773 (diff)
downloadsqlalchemy-28c3325c4e18d01d7e0403229b452c8fbc345b80.tar.gz
dial back the default "flatness" a bit, it will be there for joinedload and query.join(), but if
you're dealing with aliased() or with_polymorphic() you need to say "flat=True". Just the one flag though, "flat" implies "aliased".
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
-rw-r--r--lib/sqlalchemy/orm/mapper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 285d338de..7f14d83cb 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1767,7 +1767,7 @@ class Mapper(_InspectionAttr):
while stack:
item = stack.popleft()
descendants.append(item)
- stack.extend(item._inheriting_mappers)
+ stack.extend(sorted(item._inheriting_mappers, key=lambda m: m.class_.__name__))
return util.WeakSequence(descendants)
def polymorphic_iterator(self):