summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-09-08 03:57:25 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-09-08 03:57:25 +0000
commitbf71da5ee6961e4ce67d079651b38f414e641ac7 (patch)
tree9c6565470ede7e0756058d88cba6f4bde0a2d575 /lib/sqlalchemy
parent58c5bb7fc104da26cd1797d9680a810a3b79ab0a (diff)
downloadsqlalchemy-bf71da5ee6961e4ce67d079651b38f414e641ac7.tar.gz
reverted inheritance tweak which fails tests on non-sqlite
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/mapper.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index a13e9feb3..03f8b4553 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1225,9 +1225,11 @@ class Mapper(object):
# synchronize newly inserted ids from one table to the next
# TODO: this performs some unnecessary attribute transfers
# from an attribute to itself, since the attribute is often mapped
- # to multiple, equivalent columns
- if mapper.__inherits_equated_pairs:
- sync.populate(state, mapper, state, mapper, mapper.__inherits_equated_pairs)
+ # to multiple, equivalent columns. it also may fire off more
+ # than needed overall.
+ for m in mapper.iterate_to_root():
+ if m.__inherits_equated_pairs:
+ sync.populate(state, m, state, m, m.__inherits_equated_pairs)
# testlib.pragma exempt:__hash__
inserted_objects.add((state, connection))