1. Mike Bayer
  2. sqlalchemy

Commits

Mike Bayer  committed 3e7caad

- use an OrderedDict here so that tests are more deterministic

  • Participants
  • Parent commits 036cb93
  • Branches master

Comments (0)

Files changed (1)

File lib/sqlalchemy/ext/declarative/api.py

View file
  • Ignore whitespace
                                 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')