]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure BakedQuery is cloned before we add options to it
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 25 Jun 2018 02:50:06 +0000 (22:50 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 26 Jun 2018 19:41:00 +0000 (15:41 -0400)
commitf243c00dda1484da97e706b7237670cdce6f10b9
tree217a8209e012abd07d72dfdf3559a5832c0cd902
parent677818707471db670d5c3a83b10ebbc65f871881
Ensure BakedQuery is cloned before we add options to it

Fixed bug in new polymorphic selectin loading where the BakedQuery used
internally would be mutated by the given loader options, which would both
inappropriately mutate the subclass query as well as carry over the effect
to subsequent queries.

Change-Id: Iaceecb50557f78484d09e55b3029a0483dfe873f
Fixes: #4286
doc/build/changelog/unreleased_12/4286.rst [new file with mode: 0644]
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/orm/loading.py
test/orm/inheritance/test_poly_loading.py