]> 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:16 +0000 (15:41 -0400)
commit199b483ae02653e8178a2b055737401da8c243af
treed6f62f6d09f27bcfbab74742e2c296c2304225ac
parentffe7cda28ac79dd840c473e19ba443f0bdb7ffd6
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
(cherry picked from commit f243c00dda1484da97e706b7237670cdce6f10b9)
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