]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
inherited synchronization behavior fixed to descend all the way to the base class
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 May 2006 16:15:10 +0000 (16:15 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 31 May 2006 16:15:10 +0000 (16:15 +0000)
CHANGES
lib/sqlalchemy/orm/mapper.py

diff --git a/CHANGES b/CHANGES
index b89461904fa1b851c5f467a4999b04140418c282..06917f7689c039de468da70ed1fec0c2391a4478 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
 0.2.2
 - big improvements to polymorphic inheritance behavior, enabling it
 to work with adjacency list table structures [ticket:190]
+- major fixes and refactorings to inheritance relationships overall,
+more unit tests
 - fixed "echo_pool" flag on create_engine()
 - fix to docs, removed incorrect info that close() is unsafe to use
 with threadlocal strategy (its totally safe !)
index 7e77fd6ebd9f235a683ec22a7b85b0a8ce11db4d..bde887b2afaf40cff73f005a7756e98643bbb682 100644 (file)
@@ -660,8 +660,16 @@ class Mapper(object):
                                 self._setattrbycolumn(obj, col, primary_key[i])
                             i+=1
                     self._postfetch(connection, table, obj, c, c.last_inserted_params())
-                    if self._synchronizer is not None:
-                        self._synchronizer.execute(obj, obj)
+                    
+                    # synchronize newly inserted ids from one table to the next
+                    def sync(mapper):
+                        inherit = mapper.inherits
+                        if inherit is not None:
+                            sync(inherit)
+                        if mapper._synchronizer is not None:
+                            mapper._synchronizer.execute(obj, obj)
+                    sync(self)
+                    
                     self.extension.after_insert(self, connection, obj)
 
     def _postfetch(self, connection, table, obj, resultproxy, params):