]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add auto_recurse option to selectinload, immediateload
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 11 Jun 2022 15:33:46 +0000 (11:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Jun 2022 00:08:13 +0000 (20:08 -0400)
commitb3a1162553879d1369154e920f3f4129020bb88e
tree4de3c6553fbf2aa58886ebab6374b72be078edbf
parentb163099ada4009b2bdc9538c04120aee1f13dcc8
add auto_recurse option to selectinload, immediateload

Added very experimental feature to the :func:`_orm.selectinload` and
:func:`_orm.immediateload` loader options called
:paramref:`_orm.selectinload.auto_recurse` /
:paramref:`_orm.immediateload.auto_recurse` , which when set to True will
cause a self-referential relationship load to continue loading with
arbitrary depth until no further objects are found. This may be useful for
self-referential structures that must be loaded fully eagerly, such as when
using asyncio.

Fixes: #8126
Change-Id: I5bbd00bd0ca43f4649b44680fea1e84680f0a5db
doc/build/changelog/unreleased_20/8126.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/testing/assertions.py
test/orm/test_immediate_load.py
test/orm/test_selectin_relations.py