]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Insert primary entity in dynamic "secondary"
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 12 Nov 2018 20:09:37 +0000 (15:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 13 Nov 2018 23:36:52 +0000 (18:36 -0500)
commit105d8d2fcaaf77ee2632d8f5ea959b8a3f6b7030
treefc98d4069afe8c046a04fc5752931c499e2780a4
parent6726c60e4cff0d1f157c2fab1b2a79ad2d2182a4
Insert primary entity in dynamic "secondary"

Fixed regression caused by :ticket:`4349` where adding the "secondary"
table to the FROM clause for a dynamic loader would affect the ability of
the :class:`.Query` to make a subsequent join to another entity.   The fix
adds the primary entity as the first element of the FROM list since
:meth:`.Query.join` wants to jump from that.   Version 1.3 will have
a more comprehensive solution to this problem as well (:ticket:`4365`).

Fixes: #4363
Change-Id: I1abbb6207722619dc5369e1fd96de43d60a1ee62
(cherry picked from commit 40c1a46e993b5c5ff917ce41c3dca66c139bde94)
doc/build/changelog/unreleased_12/4363.rst [new file with mode: 0644]
lib/sqlalchemy/orm/dynamic.py
test/orm/test_dynamic.py