]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add chunking to selectin_polymorphic
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Aug 2025 14:19:39 +0000 (10:19 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 6 Aug 2025 15:27:11 +0000 (11:27 -0400)
commit9d6fa58d6996ac4cff1ac215ef389f4cb4b9ca3d
treeaa085e1a645cd77c42352901d94afec712b618d5
parent9dd5983f4d27c708d5ce6544bfb8b65f5a696358
add chunking to selectin_polymorphic

Improved the implementation of the :func:`_orm.selectin_polymorphic`
inheritance loader strategy to properly render the IN expressions using
chunks of 500 records each, in the same manner as that of the
:func:`_orm.selectinload` relationship loader strategy.  Previously, the IN
expression would be arbitrarily large, leading to failures on databases
that have limits on the size of IN expressions including Oracle Database.

Fixes: #12790
Change-Id: I8df7f34d4fdf73996780772d983b72ea0fc8309e
doc/build/changelog/unreleased_20/12790.rst [new file with mode: 0644]
lib/sqlalchemy/orm/loading.py
test/orm/inheritance/test_poly_loading.py