]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Baked query needs to spoil fully on uncachable option
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 May 2020 23:35:54 +0000 (19:35 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 May 2020 13:31:19 +0000 (09:31 -0400)
commitee4780da6370fc9a8acf5544119c551a8575708d
tree05e1b4a3abdb0efc5bc164f4eea46dfb0460657f
parent6d1167d5e4b31887e6f9b13c488b01c937d8ee88
Baked query needs to spoil fully on uncachable option

Fixed issue in the area of where loader options such as selectinload()
interact with the baked query system, such that the caching of a query is
not supposed to occur if the loader options themselves have elements such
as with_polymorphic() objects in them that currently are not
cache-compatible.  The baked loader could sometimes not fully invalidate
itself in these some of these scenarios leading to missed eager loads.

Fixes: #5303
Change-Id: Iecf847204a619694d89297f83b63b613ef9767de
(cherry picked from commit dd244758a218201e6b38c44f7a9779a40177742b)
doc/build/changelog/unreleased_13/5303.rst [new file with mode: 0644]
lib/sqlalchemy/ext/baked.py
test/ext/test_baked.py
test/orm/test_selectin_relations.py