]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use the options from the cached statement for propagate_options
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Dec 2021 18:37:21 +0000 (13:37 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 12 Dec 2021 19:23:14 +0000 (14:23 -0500)
commit60404ad39d63840a4a52927c2d878933d0a26830
tree87582881fb177d75e748d62e6363dcd76715ef3e
parent05a19294d81bff53b81d8524a60b580f401bcb45
use the options from the cached statement for propagate_options

Fixed caching-related issue where the use of a loader option of the form
``lazyload(aliased(A).bs).joinedload(B.cs)`` would fail to result in the
joinedload being invoked for runs subsequent to the query being cached, due
to a mismatch for the options / object path applied to the objects loaded
for a query with a lead entity that used ``aliased()``.

Fixes: #7447
Change-Id: I4e9c34654b7d3668cd8878decbd688afe2af5f81
(cherry picked from commit 04421c8bed9e93a625b7164e99eb1ee0395bebfe)
doc/build/changelog/unreleased_14/7447.rst [new file with mode: 0644]
lib/sqlalchemy/orm/context.py
test/orm/test_eager_relations.py