diff options
| -rw-r--r-- | lib/sqlalchemy/orm/dependency.py | 1 | ||||
| -rw-r--r-- | test/orm/test_naturalpks.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index c1cf66f14..d10a38394 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -1119,6 +1119,7 @@ class ManyToManyDP(DependencyProcessor): if c.key in associationrow ])) result = connection.execute(statement, secondary_update) + if result.supports_sane_multi_rowcount() and \ result.rowcount != len(secondary_update): raise exc.StaleDataError( diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py index 5a72881a0..ac5e723c7 100644 --- a/test/orm/test_naturalpks.py +++ b/test/orm/test_naturalpks.py @@ -393,6 +393,8 @@ class NaturalPKTest(fixtures.MappedTest): def test_manytomany_passive(self): self._test_manytomany(True) + @testing.requires.non_updating_cascade + @testing.requires.sane_multi_rowcount def test_manytomany_nonpassive(self): self._test_manytomany(False) |
