]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Check for columns not part of mapping, correct mapping for eager_defaults
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Feb 2017 02:05:16 +0000 (21:05 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Feb 2017 15:49:13 +0000 (10:49 -0500)
commit540bcff90d3e9234a776790e3fdeb8c9b8a8b443
treeadb0cd59c1a8a33866916c0b3129359c042a754a
parent000e9603065edeb997cfcb492c4063029a931de9
Check for columns not part of mapping, correct mapping for eager_defaults

Fixed two closely related bugs involving the mapper eager_defaults
flag in conjunction with single-table inheritance; one where the
eager defaults logic would inadvertently try to access a column
that's part of the mapper's "exclude_properties" list (used by
Declarative with single table inheritance) during the eager defaults
fetch, and the other where the full load of the row in order to
fetch the defaults would fail to use the correct inheriting mapper.

Fixes: #3908
Change-Id: Ie745174c917d512e2c46d9e3cc14512cde53cc9a
doc/build/changelog/changelog_11.rst
lib/sqlalchemy/orm/persistence.py
test/orm/inheritance/test_single.py