diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-12 13:15:59 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-12 14:00:49 -0400 |
commit | 3f7840c2ade87e415c24c69ac5d0494d294750e0 (patch) | |
tree | b866b6941dc5f764b94f7b5a0777c9cd3c605dc8 /test/dialect/postgresql/test_reflection.py | |
parent | b0bf421f1b12eeedd77ec6c39df8e5e6cc1fcc3f (diff) | |
download | sqlalchemy-3f7840c2ade87e415c24c69ac5d0494d294750e0.tar.gz |
Run PK/FK sync for multi-level inheritance w/ no intermediary update
Also fix DetectKeySwitch for intermediary class relationship
Fixed a series of related bugs regarding joined table inheritance more than
two levels deep, in conjunction with modification to primary key values,
where those primary key columns are also linked together in a foreign key
relationship as is typical for joined table inheritance. The intermediary
table in a three-level inheritance hierachy will now get its UPDATE if
only the primary key value has changed and passive_updates=False (e.g.
foreign key constraints not being enforced), whereas before it would be
skipped; similarly, with passive_updates=True (e.g. ON UPDATE CASCADE in
effect), the third-level table will not receive an UPDATE statement as was
the case earlier which would fail since CASCADE already modified it. In a
related issue, a relationship linked to a three-level inheritance hierarchy
on the primary key of an intermediary table of a joined-inheritance
hierarchy will also correctly have its foreign key column updated when the
parent object's primary key is modified, even if that parent object is a
subclass of the linked parent class, whereas before these classes would
not be counted.
Fixes: #4723
Change-Id: Idc408ead67702068e64d583a15149dd4beeefc24
Diffstat (limited to 'test/dialect/postgresql/test_reflection.py')
0 files changed, 0 insertions, 0 deletions