]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
ensure with poly entities are also reconstituted for GC'ed AC
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Jun 2021 20:40:09 +0000 (16:40 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 26 Jun 2021 20:41:31 +0000 (16:41 -0400)
commit4e7438e0acac2f7c9d24c73d36cdcdb74551f903
tree6e917ade06fc267786fa6cbf11ba003e2ff1b84c
parent84a68ac8820a2e1043f8317d42c5681c81cbd9d5
ensure with poly entities are also reconstituted for GC'ed AC

Fixed regression in ORM regarding an internal reconstitution step for the
func:`_orm.with_polymorphic` construct, when the user-facing object is
garbage collected as the query is processed. The reconstitution was not
ensuring the sub-entities for the "polymorphic" case were handled, leading
to an ``AttributeError``.

Fixes: #6680
Change-Id: Id35b16d0f2aadb50b5a7385a21fa81b9d8a8325f
doc/build/changelog/unreleased_14/6680.rst [new file with mode: 0644]
lib/sqlalchemy/orm/util.py
test/orm/inheritance/test_with_poly.py