]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Disable raiseload in immediateload strategy
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Apr 2021 03:48:02 +0000 (23:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Apr 2021 13:15:09 +0000 (09:15 -0400)
commitd5f0e1d846fd3cf29e88989db362348796179c3d
tree8ee2aa5ad2682b68b5da925150f41b71769efa12
parentde7f14104d5278987fa72d6866fa39569e56077e
Disable raiseload in immediateload strategy

Fixed issue in the new feature of :meth:`_orm.Session.refresh` introduced
by :ticket:`1763` where eagerly loaded relationships are also refreshed,
where the ``lazy="raise"`` and ``lazy="raise_on_sql"`` loader strategies
would interfere with the :func:`_orm.immediateload` loader strategy, thus
breaking the feature for relationships that were loaded with
:func:`_orm.selectinload`, :func:`_orm.subqueryload` as well.

Also update some docs re: refresh, populate existing, etc.

Fixes: #6252
Change-Id: I5ac1430d33f1ce868426c22c7635f41f738580ce
doc/build/changelog/unreleased_14/6252.rst [new file with mode: 0644]
doc/build/orm/queryguide.rst
doc/build/orm/session_state_management.rst
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/strategies.py
test/orm/test_immediate_load.py
test/orm/test_selectin_relations.py
test/orm/test_subquery_relations.py