]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
warn for no polymorphic identity w/ poly hierarchy
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 10 Oct 2022 18:03:04 +0000 (14:03 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Oct 2022 18:39:54 +0000 (14:39 -0400)
commitc35921b79e1683d3738a69f8ff6a892c3c2846e2
tree78493c245874882ebcedbdb7b6d623c5b4f1b4d9
parent9d132a7cf96678a732b06266fa0a35279268604b
warn for no polymorphic identity w/ poly hierarchy

A warning is emitted when attempting to configure a mapped class within an
inheritance hierarchy where the mapper is not given any polymorphic
identity, however there is a polymorphic discriminator column assigned.
Such classes should be abstract if they never intend to load directly.

Fixes: #7545
Change-Id: I94f04e59736c73e3f39d883a75d763e3f06ecc3d
doc/build/changelog/unreleased_14/7545.rst [new file with mode: 0644]
lib/sqlalchemy/orm/mapper.py
test/orm/declarative/test_dc_transforms.py
test/orm/declarative/test_inheritance.py
test/orm/declarative/test_typed_mapping.py
test/orm/inheritance/test_basic.py
test/orm/test_events.py