Changes between Version 1 and Version 2 of Ticket #33682, comment 3


Ignore:
Timestamp:
05/06/22 17:52:19 (5 months ago)
Author:
Robert Leach
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33682, comment 3

    v1 v2  
    99My updated understanding is that it seems that the reason *a* related model field is necessary is because the related model "field" in the model definition that links to the related model isn't a "field".  It's a reference that gets turned into a field that by default uses the `meta.ordering`.  (I didn't even notice that the distinct clause had `compound_id` and the order by clause had `name` in that position.)  So I'm guessing that *any*(?) related model field in front of a (non-field) related model reference (whether it's at the beginning of the distinct list or "just before" the non-field related model reference) would solve the issue?  **Or** perhaps even explicit inclusion of such a (non) field would cause the problem.
    1010
    11 I think these are areas in which the doc could be improved just a bit more.  Understanding the /why/ **better**, I think, could be helpful to avoid these pitfals, and also help to understand an otherwise cryptic error message.
     11I think these are areas in which the doc could be improved just a bit more.  Understanding the /why/ **better**, I think, could be helpful to avoid these pitfalls, and also help to understand an otherwise cryptic error message.
Back to Top