#23557: annotate gives different results on postgresql and mysql -------------------------------------+------------------------------------- Reporter: brian | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.7 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 0 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by jarshwah): I would be in favour of clearing out the ordering when using a .values call, if an entry in values does not explicitly reference the ordered column. I think this would neatly solve the issue. Unfortunately, I think that'd be backwards incompatible. A flag could be used, but I'm not sure it'd be very nice. It could also be retired after a deprecation period where the behaviour was swapped. {{{ Meta: ordering = ['col'] values_respects_ordering = False # defaults to True }}} But then I'm sure someone else will say django is silently altering the query by not respecting the Meta.ordering once the behaviour is swapped. I wish Meta.ordering didn't exist. -- Ticket URL: <https://code.djangoproject.com/ticket/23557#comment:6> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/063.d87d5d6a1fe7387d282fb1bcaabc154c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.