#30047: Documentation: add a Note about default ordering on models used in Subquery filters -------------------------------+-------------------------------------- Reporter: powderflask | Owner: nobody Type: Uncategorized | Status: new Component: Documentation | Version: 2.1 Severity: Normal | Resolution: 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 Simon Charette): Even if it doesn't completely solves the issue the subquery code should be able to [https://github.com/django/django/blob/1939dd49d142b65fa22eb5f85cee0d20864d3730/django/db/models/sql/query.py#L1009-L1014 clear the ordering under certain circumstances] in the first place (`default` aka `Model.ordering` included). There's a lot duplicate code between `Subquery.resolve_expression` and `Query.resolve_expression` and most of it should probably live in `Query`, that would take care of this issue by itself. -- Ticket URL: <https://code.djangoproject.com/ticket/30047#comment:1> 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/069.e46960b24d775922c578f48d3f69d45b%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.