#26195: order_by pk doesn't work in multi-table inheritance models if parent has
default ordering
-------------------------------------+-------------------------------------
Reporter: ris | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution:
Keywords: multi table | Triage Stage:
inheritance order_by MTI pk | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by ris):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Note however doing `.order_by ( "id" )` or `.order_by ( "modela_ptr_id" )`
works as expected:
{{{
'SELECT "dummy_modela"."id", "dummy_modela"."x",
"dummy_modelb"."modela_ptr_id" FROM "dummy_modelb" INNER JOIN
"dummy_modela" ON ( "dummy_modelb"."modela_ptr_id" = "dummy_modela"."id" )
ORDER BY "dummy_modelb"."modela_ptr_id" ASC'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26195#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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.7607e29b7f5c92e5397929ad6f0c0794%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.