From: Mike Bayer Date: Sun, 4 Apr 2010 14:18:16 +0000 (-0400) Subject: - apparently [ticket:1761] was covered in tests already. X-Git-Tag: rel_0_6_0~64^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbc582a43fb8e5d3c0b05cb62b6a77c4e5bc27ac;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - apparently [ticket:1761] was covered in tests already. - 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] --- diff --git a/CHANGES b/CHANGES index 8b0e98371e..cdc860b375 100644 --- 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 diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index f83275b360..56cb1ef4d5 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -1334,7 +1334,7 @@ class Mapper(object): ) table_to_mapper = self._sorted_tables - + for table in table_to_mapper: insert = [] update = [] diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index 07e545bd16..ccb1c01774 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -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()