django1/tests/filtered_relation
Rob 6b736dd074 Fixed #30349 -- Fixed QuerySet.exclude() on FilteredRelation.
Using annotated FilteredRelations raised a FieldError when coupled with
exclude(). This is due to not passing filtered relation fields to the
subquery created in split_exclude(). We fixed this issue by passing the
filtered relation data to the newly created subquery.

Secondly, in the case where an INNER JOIN is used in the excluded
subquery, the ORM would trim the filtered relation INNER JOIN in attempt
to simplify the query. This will also remove the ON clause filters
generated by the FilteredRelation. We added logic to not trim the INNER
JOIN if it is from FilteredRelation.
2019-05-07 14:47:50 +02:00
..
__init__.py Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support. 2017-09-22 11:53:17 -04:00
models.py Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) support. 2017-09-22 11:53:17 -04:00
tests.py Fixed #30349 -- Fixed QuerySet.exclude() on FilteredRelation. 2019-05-07 14:47:50 +02:00