diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-02 22:56:19 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-02 22:56:19 +0000 |
commit | c1e0978556c50a44b371a196fecfb08f0117c047 (patch) | |
tree | 38757ccc1fc2affffbbf980adaed2b682e6899e0 /test/orm/inheritance/test_basic.py | |
parent | 9a84fa585bf7ee9db7de0abc9b175cd397199335 (diff) | |
download | sqlalchemy-c1e0978556c50a44b371a196fecfb08f0117c047.tar.gz |
- Primary key values can now be changed on a joined-table inheritance
object, and ON UPDATE CASCADE will be taken into account when
the flush happens. Set the new "passive_updates" flag to False
on mapper() when using SQLite or MySQL/MyISAM. [ticket:1362]
- flush() now detects when a primary key column was updated by
an ON UPDATE CASCADE operation from another primary key, and
can then locate the row for a subsequent UPDATE on the new PK
value. This occurs when a relation() is there to establish
the relationship as well as passive_updates=True. [ticket:1671]
Diffstat (limited to 'test/orm/inheritance/test_basic.py')
-rw-r--r-- | test/orm/inheritance/test_basic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index e189159ea..aed7cf5ef 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -732,6 +732,7 @@ class DistinctPKTest(_base.MappedTest): class SyncCompileTest(_base.MappedTest): """test that syncrules compile properly on custom inherit conds""" + @classmethod def define_tables(cls, metadata): global _a_table, _b_table, _c_table @@ -754,7 +755,8 @@ class SyncCompileTest(_base.MappedTest): def test_joins(self): for j1 in (None, _b_table.c.a_id==_a_table.c.id, _a_table.c.id==_b_table.c.a_id): - for j2 in (None, _b_table.c.a_id==_c_table.c.b_a_id, _c_table.c.b_a_id==_b_table.c.a_id): + for j2 in (None, _b_table.c.a_id==_c_table.c.b_a_id, + _c_table.c.b_a_id==_b_table.c.a_id): self._do_test(j1, j2) for t in reversed(_a_table.metadata.sorted_tables): t.delete().execute().close() |