Commits

Mike Bayer committed fb879c7

Fixed regression where query.update() would produce
an error if an object matched by the "fetch"
synchronization strategy wasn't locally present.
Courtesy Scott Torborg. [ticket:2602]

Comments (0)

Files changed (2)

doc/build/changelog/changelog_08.rst

     :version: 0.8.0b2
 
     .. change::
+        :tags: orm, bug
+        :tickets: 2602
+
+        Fixed regression where query.update() would produce
+        an error if an object matched by the "fetch"
+        synchronization strategy wasn't locally present.
+        Courtesy Scott Torborg.
+
+    .. change::
         :tags: sql, bug
         :tickets: 2597
 

test/orm/test_update_delete.py

 
         sess.query(User).filter(User.id == 3).\
                 update({'age': 44}, synchronize_session='fetch')
-        eq_(sess.query(User.age).order_by(User.id).all(), zip([25,37,44,27]))
+        eq_(sess.query(User.age).order_by(User.id).all(), zip([25,47,44,37]))
 
     def test_update_changes_resets_dirty(self):
         User = self.classes.User