Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#2238 closed enhancement (wontfix)

select_related should fetch reverse relations

Reported by: derelm Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: bronger@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


select_related on a certain model A only fetches tables that are referenced from within that model A.

i think it should also fetch those models B that define a relation to A.

Change History (6)

comment:1 Changed 10 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

This wouldn't work, if you think about it, because of the nature of the underlying SQL.

comment:2 Changed 7 years ago by bronger

Maybe I didn't understand this report correctly, but claims that this actually works in Rails.

comment:3 Changed 7 years ago by bronger

  • Cc bronger@… added

comment:4 Changed 6 years ago by __alex__

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I know this is quite old, but is this planned to be included in the orm at some point ?
If not, is it possible to get an explanation on why is this considered impossible ?

comment:5 Changed 6 years ago by kmtracey

  • Resolution set to wontfix
  • Status changed from reopened to closed

Please read:, which notes you should ask for a wontfix explanation on the django-developers list, not by reopening the ticket.

comment:6 Changed 6 years ago by carljm

Since r12307 the ORM does follow reverse one-to-one fields.

Note: See TracTickets for help on using tickets.
Back to Top