]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
implement active_history for composites
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Mar 2023 17:41:03 +0000 (12:41 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Mar 2023 21:25:01 +0000 (16:25 -0500)
commitb09e9198bc8722a59ad37958ee5944085fe2dee5
treeeb73b6952850fa91653f6be0d01385d2db39cb4c
parent9c0715181de6f03543c7ac9038c481f57f773d49
implement active_history for composites

Fixed bug where the "active history" feature was not fully
implemented for composite attributes, making it impossible to receive
events that included the "old" value.   This seems to have been the case
with older SQLAlchemy versions as well, where "active_history" would
be propagated to the underlying column-based attributes, but an event
handler listening to the composite attribute itself would not be given
the "old" value being replaced, even if the composite() were set up
with active_history=True.

Additionally, fixed a regression that's local to 2.0 which disallowed
active_history on composite from being assigned to the impl with
``attr.impl.active_history=True``.

Fixes: #9460
Change-Id: I6d7752a01c8d3fd78de7a90de10e8c52f9b3cd4e
doc/build/changelog/unreleased_20/9460.rst [new file with mode: 0644]
lib/sqlalchemy/orm/descriptor_props.py
test/orm/test_composites.py