On Wed, Oct 28, 2020 at 3:38 PM Adam Johnson <m...@adamj.eu> wrote:

> I’d vote for option 2. I don’t think it can be expected the ordering will
> be obeyed when not selecting the columns it includes.
>

Thanks! To make sure I understand, are you suggesting we should leave the
behavior with an explicit order_by() as-is, or not add "name" to the SELECT
in this case either?

>>> str(School.objects.values("county").order_by("name").distinct().query)
'SELECT DISTINCT "testapp_school"."county", "testapp_school"."name" FROM
"testapp_school" ORDER BY "testapp_school"."name" ASC'


*Tobias McNulty*Chief Executive Officer

tob...@caktusgroup.com
www.caktusgroup.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMGFDKQTNE%3D%2B%2B%2B0HPqZAndPzkAO4sWxKbqxhG9%2BLJpFOJiL5Ag%40mail.gmail.com.

Reply via email to