]> 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:39:05 +0000 (22:39 -0400)
commit77d947b88ddf4878543ae230ced5cffd295fdb36
tree9eb3391149c4b2cd85deea1907fffeb10836b67c
parent9a4e675e055313f2f76fdbf59e1836a158694621
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
(cherry picked from commit bdafff8982d9e7fbf9a39182f1fb8e65d475bbb9)
lib/sqlalchemy/orm/persistence.py
test/orm/test_unitofworkv2.py