]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The :class:`.SessionEvents` suite now includes events to allow
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Aug 2015 21:43:46 +0000 (17:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 2 Sep 2015 21:55:15 +0000 (17:55 -0400)
commit108c60f460c723a0f48c47597928d938a3b0a42d
treefaad446079cfacfe6aacec92900aa5d2bbfa70ac
parent8be93c23ee566de7cefd7d1b8ef044324132a70f
- The :class:`.SessionEvents` suite now includes events to allow
unambiguous tracking of all object lifecycle state transitions
in terms of the :class:`.Session` itself, e.g. pending,
transient,  persistent, detached.   The state of the object
within each event is also defined.
fixes #2677
- Added a new session lifecycle state :term:`deleted`.  This new state
represents an object that has been deleted from the :term:`persistent`
state and will move to the :term:`detached` state once the transaction
is committed.  This resolves the long-standing issue that objects
which were deleted existed in a gray area between persistent and
detached.   The :attr:`.InstanceState.persistent` accessor will
**no longer** report on a deleted object as persistent; the
:attr:`.InstanceState.deleted` accessor will instead be True for
these objects, until they become detached.
- The :paramref:`.Session.weak_identity_map` parameter is deprecated.
See the new recipe at :ref:`session_referencing_behavior` for
an event-based approach to maintaining strong identity map behavior.
references #3517
17 files changed:
doc/build/changelog/changelog_11.rst
doc/build/changelog/migration_11.rst
doc/build/glossary.rst
doc/build/orm/session_events.rst
doc/build/orm/session_state_management.rst
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/identity.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/state.py
lib/sqlalchemy/orm/util.py
test/orm/test_events.py
test/orm/test_hasparent.py
test/orm/test_load_on_fks.py
test/orm/test_session.py
test/orm/test_transaction.py
test/profiles.txt