Changes between Initial Version and Version 1 of Ticket #33682, comment 9


Ignore:
Timestamp:
May 12, 2022, 11:33:46 AM (2 years ago)
Author:
Robert Leach

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33682, comment 9

    initial v1  
    1 That's definitely better, as it directly references Meta.ordering, which is a great clue to what the implications are.  What do you think about **adding** something like:
     1That's definitely better, as it directly references Meta.ordering, which is a great clue to what the implications are.  What do you think about **adding** something like this to what you wrote above:
    22
    33> If all you want is to make a set of query results distinct without changing the ordering, note you must explicitly "re-"add the otherwise over-ridden fields defined in Meta.ordering.  But be careful, if you simply add those fields, you can run afoul of the matching fields requirement between order_by and distinct.  The field(s) defined in Meta.ordering can include a foreign key, which will resolve differently in order_by (to the related model's Meta.ordering field(s)) and distinct (the `_id`) and the fields will no longer match between the 2 expressions.
Back to Top