Changes between Version 1 and Version 2 of Ticket #35751
- Timestamp:
- Sep 10, 2024, 1:36:44 PM (2 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35751 – Description
v1 v2 1 1 Python 3.10 @ Django 5.1.1 2 2 3 Using a many to many relation for ordering (which is something you shouldn't do?) will affect the traversing when the object in question is accessed via a foreign key - the necessary left join for the ordering "spills" into the ORM results, yielding n (number of foreign key references) times m (number of many-to-many relations within the object) times n objects instead of just the actual n objects.3 Using a many to many relation for ordering (which is something you shouldn't do?) will affect the traversing when the object in question is accessed via a foreign key - the necessary left join for the ordering "spills" into the ORM results, yielding n (number of foreign key references) times m (number of many-to-many relations within the object) objects instead of just the actual n objects referencing the foreign key. 4 4 5 5 If you comment out the ordering the ORM behaves as expected.