#32811: Annotate removes Meta.ordering
-------------------------------------+-------------------------------------
     Reporter:  pirelle              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  3.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:2 Peter Law]:
 > Request that this be reconsidered.
 >
 > ...
 > At the very least I think this (current behaviour) needs to be clearly
 documented as a part of both the `Meta.ordering` and aggregation docs,
 however to be honest I would prefer the previous behaviour. It feels very
 surprising that Django will silently drop part of its model configuration
 in some cases!
 > At least if this were documented people could see what those cases were,
 however at the moment the only way to know is when you're bitten by the
 issue described here.

 The previous behavior was implicit, unexpected, and caused many support
 questions. We reached the consensus that removing any default ordering for
 grouped queries is the right thing to do. You can always add `order_by()`
 (as [https://docs.djangoproject.com/en/3.2/topics/db/aggregation
 /#interaction-with-order-by documented]).

 You can start a discussion on DevelopersMailingList if you don't agree,
 but I don't think there would be consensus to restore it. Personally, I'm
 strongly against it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32811#comment:3>
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/065.8a15154121c944ff707f84a675ea85a7%40djangoproject.com.

Reply via email to