]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Raise for NULL discriminator and pk is present
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 3 Sep 2019 13:56:41 +0000 (09:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 4 Sep 2019 02:20:15 +0000 (22:20 -0400)
commitc3dcdbd21de44b23e527f5580c318e47ea6930a7
treed180fa6afd22e6d09e27cf7c4d710c8177549557
parent43e0d7c06ba154e806a72d72ad06ae56a32225aa
Raise for NULL discriminator and pk is present

An exception is now raised if the ORM loads a row for a polymorphic
instance that has a primary key but the discriminator column is NULL, as
discriminator columns should not be null.

Fixes: #4836
Change-Id: Ice1a853a7dd7687c58079b9933f145b90d314236
doc/build/changelog/unreleased_14/4836.rst [new file with mode: 0644]
lib/sqlalchemy/orm/loading.py
test/orm/inheritance/test_basic.py
test/orm/inheritance/test_relationship.py