Commits

Mike Bayer committed f939812

decruftify UOW some more....uowdumper always prints out based on
polymorphic collections

Comments (0)

Files changed (2)

lib/sqlalchemy/orm/unitofwork.py

     polymorphic_tosave_elements = property(lambda self: [rec for rec in self.polymorphic_elements
                                              if not rec.isdelete])
                                              
-    tosave_elements = property(lambda self: [rec for rec in self.elements
-                                             if not rec.isdelete])
-
     polymorphic_todelete_elements = property(lambda self:[rec for rec in self.polymorphic_elements
                                                if rec.isdelete])
 
-    todelete_elements = property(lambda self:[rec for rec in self.elements
-                                              if rec.isdelete])
-
     polymorphic_tosave_objects = property(lambda self:[rec.obj for rec in self.polymorphic_elements
                                           if rec.obj is not None and not rec.listonly and rec.isdelete is False])
 

lib/sqlalchemy/orm/uowdumper.py

 
     def _dump_processor(self, proc, deletes):
         if deletes:
-            val = proc.targettask.todelete_elements
+            val = proc.targettask.polymorphic_todelete_elements
         else:
-            val = proc.targettask.tosave_elements
+            val = proc.targettask.polymorphic_tosave_elements
 
         if self.verbose:
             self.buf.write(self._indent() + "   |- %s attribute on %s (UOWDependencyProcessor(%d) processing %s)\n" % (