]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(no commit message)
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 22 Oct 2005 05:51:05 +0000 (05:51 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 22 Oct 2005 05:51:05 +0000 (05:51 +0000)
lib/sqlalchemy/mapper.py

index 3cee340d4105ed8a7ab1ebbe2f17aee992ab9c5b..42e0945bb65f9f2d9ecf00a95ebb6882f0fb7546 100644 (file)
@@ -423,8 +423,8 @@ class Mapper(object):
                     clause.clauses.append(col == sql.bindparam(col.table.name + "_" + col.key))
                 statement = table.update(clause)
                 c = statement.execute(*update)
-                if c.cursor.rowcount != len(update):
-                    raise "ConcurrencyError - updated rowcount does not match number of objects updated"
+                if c.rowcount != len(update):
+                    raise "ConcurrencyError - updated rowcount %d does not match number of objects updated %d" % (c.cursor.rowcount, len(update))
             if len(insert):
                 statement = table.insert()
                 for rec in insert:
@@ -458,8 +458,8 @@ class Mapper(object):
                     clause.clauses.append(col == sql.bindparam(col.key))
                 statement = table.delete(clause)
                 c = statement.execute(*delete)
-                if c.cursor.rowcount != len(delete):
-                    raise "ConcurrencyError - updated rowcount does not match number of objects updated"
+                if c.rowcount != len(delete):
+                    raise "ConcurrencyError - updated rowcount %d does not match number of objects updated %d" % (c.cursor.rowcount, len(delete))
 
     def register_dependencies(self, *args, **kwargs):
         """called by an instance of objectstore.UOWTransaction to register