#33682: Clarify using distinct() with related fields that have Meta.ordering
defined.
--------------------------------------+------------------------------------
Reporter: Robert Leach | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 3.2
Severity: Normal | Resolution:
Keywords: sql, distinct | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Carlton Gibson):
I think Mariusz' suggestion is more appropriate. I don't think the more
discursive "gotcha"-type content fits in the reference documentation,
rather than a more tutorial like piece, where it would be better. (Perhaps
a blog post if there's no spot we yet discuss this in that kind of
context.)
I think the **solution** here comes back to Simon's comment:1…
> ...error out loudly so at least users are not presented this cryptic
error.
If we could catch this and present an error showing the field mismatch
folks would be able to correct at source. (That's totally Blue Skies — no
idea how easy building a better error message is here.)
(I think like Mariusz, I'd lean heavily towards the ''raise'' option,
rather than trying to implicitly do/guess the right thing™ here.)
HTH
--
Ticket URL: <https://code.djangoproject.com/ticket/33682#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070180bc5d60f4-74dd7b9f-ffd6-44f4-9bf9-2d6c1ba32d57-000000%40eu-central-1.amazonses.com.