#26092: Regression when using order_by() on a ManyToManyField using the
'through'
feature
-------------------------------------+-------------------------------------
Reporter: wjakob | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by lamby):
FYI this was also affecting OneToOne fields, eg.:
{{{
class Parent(models.Model):
pass
class Child(models.Model):
parent = models.OneToOneField(Parent, related_name='child')
ordering = models.IntegerField()
class Meta:
ordering = ('ordering',)
>>> Parent.objects.order_by('child')
# (boom)
}}}
Calling:
{{{
>>> Parent.objects.order_by('child__ordering')
}}}
.. would temporarily "fix" it.
Mentioning it in case you want to expand the release notes and for anyone
else hit by this issue in 1.9.1
--
Ticket URL: <https://code.djangoproject.com/ticket/26092#comment:11>
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/064.71b6840a49c46bcd1176d9b3fb04b255%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.