#16855: select_related doesn't chain as expected
-----------------+----------------------------------------------
Reporter: Leo | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Database layer (models, ORM)
Version: SVN | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------+----------------------------------------------
If I'm doing something like:
{{{#!python
Foo.objects.select_related('fieldone').select_related('fieldtwo')
}}}
I would expect the select related to function on both `fieldone` and
`fieldtwo`. What actually happens is that the select_related only works on
`fieldtwo`. This is a problem for compositing queries at runtime (for
example in search filters) and is a departure from how I would expect
queryset methods to work.
If the design decision is to keep it this way, there should be a note in
the docs pointing this out.
--
Ticket URL: <https://code.djangoproject.com/ticket/16855>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.