id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 14942 .distinct() + ordering/order_by() is a problem even without related models Christophe Pettus nobody The documentation at http://docs.djangoproject.com/en/1.2/ref/models/querysets/#distinct implies that using .distinct() with ordering (which can come from either the Meta value or the .order_by() call on the QuerySet) is only an issue if you are querying across related models, but that's not true; it can bite you even if you are staying within the same model. A rewrite of the note in question is probably in order. closed Documentation 1.2 invalid Unreviewed 0 0 0 0 0 0