Changes between Version 3 and Version 4 of Ticket #35751, comment 4


Ignore:
Timestamp:
Sep 10, 2024, 4:19:51 PM (2 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35751, comment 4

    v3 v4  
    33> Using a many to many relation for ordering (which is something you shouldn't do?)
    44
    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?
     5Could 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?
    66
    7 What are you expecting `booking_times__date` to even mean?
     7What 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?
    88
    99See #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.
Back to Top