Opened 15 years ago

Closed 15 years ago

#12167 closed (wontfix)

related objects should not trigger db query on reverese related lookup

Reported by: Alexander Schepanovski Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm having smth like:

    class Place(models.Model):
        pass

    class Flank(models.Model):
        place = models.ForeignKey(Place, related_name='flanks')

loading place from db:

    p = Place.objects.get(pk=...)
    flanks = p.flanks.all()
    flanks[0].place  # Should not trigger db query !

Also, it flanks[0].place should be the same as p.
I realize this issue relates to #17, but nobody knows when that will be solved. And fixing this seems easy.

Change History (1)

comment:1 by Alex Gaynor, 15 years ago

Resolution: wontfix
Status: newclosed

Fixing this is *really* not easy. Closing as wontfix, this isn't even a dupe of #17, this is just a ridiculously difficult to implement special case.

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