]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- apparently [ticket:1761] was covered in tests already.
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 4 Apr 2010 14:18:16 +0000 (10:18 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 4 Apr 2010 14:18:16 +0000 (10:18 -0400)
- Usage of version_id_col on a backend that supports
cursor.rowcount for execute() but not executemany() now works
when a delete is issued (already worked for saves, since those
don't use executemany()). For a backend that doesn't support
cursor.rowcount at all, a warning is emitted the same
as with saves.  [ticket:1761]

CHANGES
lib/sqlalchemy/orm/mapper.py
test/orm/test_versioning.py

diff --git a/CHANGES b/CHANGES
index 8b0e98371e47fcd746427de410d1c890c8db1b96..cdc860b3757e605313b1d55999910aad249cb54d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -42,6 +42,13 @@ CHANGES
   - Added kw argument 'doc' to all mapper property callables 
     as well as Column().  Will assemble the string 'doc' as 
     the '__doc__' attribute on the descriptor.  
+
+  - Usage of version_id_col on a backend that supports 
+    cursor.rowcount for execute() but not executemany() now works
+    when a delete is issued (already worked for saves, since those
+    don't use executemany()). For a backend that doesn't support 
+    cursor.rowcount at all, a warning is emitted the same
+    as with saves.  [ticket:1761]
     
 - sql
   - Restored some bind-labeling logic from 0.5 which ensures
index f83275b360341df9886e6e2a32f570d8594c9b21..56cb1ef4d56a59d24ddac3be019ec65624cded9a 100644 (file)
@@ -1334,7 +1334,7 @@ class Mapper(object):
             )
 
         table_to_mapper = self._sorted_tables
-        
+
         for table in table_to_mapper:
             insert = []
             update = []
index 07e545bd16dacf1c56ac12e070afb0c6c8d76731..ccb1c01774573bc0b4e4adb562df8dc7c508de81 100644 (file)
@@ -102,7 +102,7 @@ class VersioningTest(_base.MappedTest):
         s1.delete(f1)
         s1.delete(f2)
 
-        if testing.db.dialect.supports_sane_multi_rowcount:
+        if testing.db.dialect.supports_sane_rowcount:
             assert_raises(sa.orm.exc.ConcurrentModificationError, s1.commit)
         else:
             s1.commit()