]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The mechanism by which attribute events pass along an
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 26 Jul 2013 04:01:04 +0000 (00:01 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 26 Jul 2013 04:01:04 +0000 (00:01 -0400)
commit550141b14c8e165218cd32c27d91541eeee86d2a
tree1a87bc7934aab81f4b1b84c9100e73b56d45d09a
parente60c16c7e6c2494b623553f41694c1ebde4d65d8
- The mechanism by which attribute events pass along an
:class:`.AttributeImpl` as an "initiator" token has been changed;
the object is now an event-specific object called :class:`.attributes.Event`.
Additionally, the attribute system no longer halts events based
on a matching "initiator" token; this logic has been moved to be
specific to ORM backref event handlers, which are the typical source
of the re-propagation of an attribute event onto subsequent append/set/remove
operations.  End user code which emulates the behavior of backrefs
must now ensure that recursive event propagation schemes are halted,
if the scheme does not use the backref handlers.   Using this new system,
backref handlers can now peform a
"two-hop" operation when an object is appended to a collection,
associated with a new many-to-one, de-associated with the previous
many-to-one, and then removed from a previous collection.   Before this
change, the last step of removal from the previous collection would
not occur.
[ticket:2789]
doc/build/changelog/changelog_09.rst
doc/build/changelog/migration_09.rst
doc/build/orm/internals.rst
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/events.py
test/orm/test_attributes.py
test/orm/test_backref_mutations.py