Django

Code

Ticket #2238 (closed: wontfix)

Opened 4 years ago

Last modified 4 weeks ago

select_related should fetch reverse relations

Reported by: derelm Assigned to: adrian
Milestone: Component: Database layer (models, ORM)
Version: Keywords:
Cc: bronger@physik.rwth-aachen.de Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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.

Attachments

Change History

06/26/06 07:03:07 changed by adrian

  • status changed from new to closed.
  • resolution set to wontfix.

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

12/10/08 17:29:31 changed by bronger

Maybe I didn't understand this report correctly, but http://rubynugs.blogspot.com/2008/07/couple-of-stupid-things-about-djano.html claims that this actually works in Rails.

12/10/08 17:29:55 changed by bronger

  • cc set to bronger@physik.rwth-aachen.de.

02/22/10 15:11:36 changed by __alex__

  • status changed from closed to reopened.
  • resolution deleted.

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 ?

02/22/10 23:05:41 changed by kmtracey

  • status changed from reopened to closed.
  • resolution set to wontfix.

Please read: http://docs.djangoproject.com/en/dev/internals/contributing/#id1, which notes you should ask for a wontfix explanation on the django-developers list, not by reopening the ticket.

02/23/10 08:30:25 changed by carljm

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


Add/Change #2238 (select_related should fetch reverse relations)




Change Properties
Action