Changes between Version 3 and Version 4 of Ticket #35751, comment 4
- Timestamp:
- Sep 10, 2024, 4:19:51 PM (2 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35751, comment 4
v3 v4 3 3 > Using a many to many relation for ordering (which is something you shouldn't do?) 4 4 5 Could you describe wha are you expecting to happen when specifying `order_by("booking_times__date")` if not for each item to be returned multiple times? Are you looking for `order_by(Min("booking_times__date"))` instead?5 Could you describe wha are you expecting to happen when specifying `order_by("booking_times__date")` if not for each item to be returned multiple times? 6 6 7 What are you expecting `booking_times__date` to even mean? 7 What are you expecting `booking_times__date` to even mean? Are you looking for `order_by(Min("booking_times__date"))` instead so the items are ordered by their first booking date, or maybe `Max("booking_times__date")` so its the item with the booking that ends first, or maybe you interested in ordering by the shortest booking duration? 8 8 9 9 See #20842 which introduced this documentation addition and ticket:20842#comment:3 which explains why `order_by("booking_times__date")` by itself doesn't make much sense and should likely be deprecated.