]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add secondary selectable to FROM clauses for correlated exists
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 14 Nov 2018 16:02:40 +0000 (11:02 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 14 Nov 2018 22:37:55 +0000 (17:37 -0500)
commitbdb7fd10e9d488f8a7bfff2f508f49e517e50f4c
treed029859bee8592594fdd82d768296f58a3fb18b8
parent40e4fc3021ad69ed10cf8253f73c05da2af93e48
Add secondary selectable to FROM clauses for correlated exists

In continuing with a similar theme as that of very recent :ticket:`4349`,
repaired issue with :meth:`.RelationshipProperty.Comparator.any` and
:meth:`.RelationshipProperty.Comparator.has` where the "secondary"
selectable needs to be explicitly part of the FROM clause in the
EXISTS subquery to suit the case where this "secondary" is a :class:`.Join`
object.

Fixes: #4366
Change-Id: Icd0d0c3871bbd0059f0c9256e2b980edc2c90551
(cherry picked from commit fdfd1680603f6663182ba4766ae2f5abdd3ced45)
doc/build/changelog/unreleased_12/4366.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
test/orm/test_query.py