#33176: Unexpected results using order_by with multiple fields
-------------------------------------+-------------------------------------
Reporter: Mauro Crociara | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: order, order_by, | Triage Stage:
OrderBy, ordering | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):
* status: new => closed
* resolution: => needsinfo
Comment:
Thank you for your report but it's impossible for triagers to determine
whether or not Django or your project is at fault here since you didn't
provide your models or managers code.
From a cursory look at your ORM interactions and provided generated SQL
there's clearly a few missing points (`GROUP BY` clause without any
aggregation, `ORDER BY` missing field) and the fact things ''work'' when
using `OrderBy` instead of field references makes me believe you have a
base manager doing some form `annotate` or `alias` that are not
represented here.
Please provide a simpified sample project demonstrating the unexpected
behavior where Django might be at fault and re-open this ticket with a
reference to it.
--
Ticket URL: <https://code.djangoproject.com/ticket/33176#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.e2d1744e73264d8c2835df4629fc6fcb%40djangoproject.com.