Commits

Mike Bayer committed 3e7caad

- use an OrderedDict here so that tests are more deterministic

Comments (0)

Files changed (1)

lib/sqlalchemy/ext/declarative/api.py

                                 interfaces, properties
 from ...orm.util import polymorphic_union
 from ...orm.base import _mapper_or_none
-from ...util import compat
+from ...util import OrderedDict
 from ... import exc
 import weakref
 
 
     @classmethod
     def _create_polymorphic_union(cls, mappers):
-        return polymorphic_union(dict(
+        return polymorphic_union(OrderedDict(
             (mp.polymorphic_identity, mp.local_table)
             for mp in mappers
          ), 'type', 'pjoin')