Seriously, if we documented everything that wasn't possible with Django,
the documentation would be a couple of million words long. There's
nothing that says select_related() does work with reverse relations and
if people are going to make assumptions, that's their problem.
>
> If it were documented, someone might get idea to improve django and
> make patch for it...
It is documented in that respect. In a couple of different Trac tickets
(since there are multiple issues: select related for reverse one-to-one,
which only isn't in 1.1-beta because I ran out of time to fix the patch,
and select-related for multi-valued relations).
Regards,
Malcolm
> It is documented in that respect. In a couple of different Trac
> tickets
> (since there are multiple issues: select related for reverse one-to-
> one,
> which only isn't in 1.1-beta because I ran out of time to fix the
> patch,
> and select-related for multi-valued relations).
I'll happily bring the patch up to date on #7270 for 1.1 if it's just
a matter of you running out of time. You took over the ticket the day
I started looking back into it, so I let it be till I heard more from
you. :)
George
No, it's a bit more than that. I spent quite a bit of time looking at
this over the past week (I wanted to get it finished by yesterday
because I know of a bunch of high-volume places where it could be useful
for usre profiles). It seems to be a bit more intrusive than it needs to
be, but that's more of a gut feeling (which I trust) than anything
concrete yet. It also adds four new modules to the tests, when it seems
to only need to update one or two others (okay -- a rare case of a
complaint about "too much testing", but it's a little messy and just
placed a little strangely into the existing source).
Also, looking at it, the SQL it constructs isn't correct (I believe this
is also mentioned in a comment on the ticket somewhere). It isn't
promoting joins to outer joins all the time, which means results will be
omitted.
I do apologise, I realise I let you down here when you did so much work
on this initially. I have nothing to say to that. Will try to do better
next time. It got priorised lower than some things with greater impact.
Regards,
Malcolm