]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Correct fix and tests for #4661
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 11 May 2019 02:36:40 +0000 (22:36 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 11 May 2019 02:36:40 +0000 (22:36 -0400)
commitbdafff8982d9e7fbf9a39182f1fb8e65d475bbb9
tree6b4f5d10dc420bada9e8e007fb677f21e32008ed
parentf601791a914d3181252493800871c458ad6c46d1
Correct fix and tests for #4661

For #4661 we need to still warn if we are only deleting one row,
even if sane multi rowcount is false.   Tests were failing for
pyodbc since the warning was removed for the single-row case.
the UPDATE logic raises if a single row doesn't match even
if sane multi rowcount is false, so this is now more consistent
with that.  Add tests for the UPDATE case also.  It is possible
there are already tests for this but as the DELETE case wasn't
well covered it's not clear.

Fixes: #4661
Change-Id: Ie57f765ff31bf806206837c5fbfe449b02ebf4be
lib/sqlalchemy/orm/persistence.py
test/orm/test_unitofworkv2.py