summaryrefslogtreecommitdiff
path: root/tests/filtered_relation
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.Simon Charette2023-04-241-0/+41
| | | | | | | | | | | The previous implementation resolved condition at Join compilation time which required introducing a specialized expression resolving mode to alter the join reuse logic solely during that phase. FilteredRelation.condition is now resolved when the relation is first referenced which maintains the existing behavior while allowing the removal of the specialized resolving mode and address an issue where conditions couldn't spawn new joins.
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-8/+8
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Relaxed some query ordering assertions in various tests.Mariusz Felisiak2022-04-141-1/+1
| | | It accounts for differences seen on MySQL with MyISAM storage engine.
* Fixed #33598 -- Reverted "Removed unnecessary reuse_with_filtered_relation ↵Mariusz Felisiak2022-03-301-0/+28
| | | | | | | | | argument from Query methods." Thanks lind-marcus for the report. This reverts commit 0c71e0f9cfa714a22297ad31dd5613ee548db379. Regression in 0c71e0f9cfa714a22297ad31dd5613ee548db379.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-1/+3
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-072-374/+601
|
* Fixed #29789 -- Added support for nested relations to FilteredRelation.matt ferrante2020-07-092-16/+294
|
* Removed unused __str__() methods in tests models.Mariusz Felisiak2020-04-301-18/+0
| | | Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
* Fixed #30854 -- Fixed QuerySet.select_related() with multiple FilteredRelations.Hasan Ramezani2019-10-111-0/+12
|
* Fixed #30651 -- Made __eq__() methods return NotImplemented for not ↵ElizabethU2019-10-011-0/+5
| | | | | | | | | implemented comparisons. Changed __eq__ to return NotImplemented instead of False if compared to an object of the same type, as is recommended by the Python data model reference. Now these models can be compared to ANY (or other objects with __eq__ overwritten) without returning False automatically.
* Fixed #30349 -- Fixed QuerySet.exclude() on FilteredRelation.Rob2019-05-071-0/+8
| | | | | | | | | | | | | 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.
* Fixed #29810 -- Fixed crash of select_related() on FilteredRelation with ↵can2019-04-231-0/+6
| | | | empty result.
* Refs #28010 -- Allowed reverse related fields in SELECT FOR UPDATE .. OF.Ran Benita2017-10-281-1/+15
| | | | Thanks Adam Chidlow for polishing the patch.
* Fixed #27332 -- Added FilteredRelation API for conditional join (ON clause) ↵Nicolas Delaby2017-09-223-0/+489
support. Thanks Anssi Kääriäinen for contributing to the patch.