Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#9926 closed (fixed)

Nullable FK to inherited model excludes results when using .select_related()

Reported by: Adam Gomaa Owned by: Malcolm Tredinnick
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Patch to the query regression test demonstrating the problem is attached. I'm pretty lost on getting a fix; it's in some hairy query code.

Present in 1.0 and trunk.

Attachments (1)

2008-12-29-select-related-subclass-null.patch (1.7 KB ) - added by Adam Gomaa 16 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Malcolm Tredinnick, 16 years ago

Owner: changed from nobody to Malcolm Tredinnick
Status: newassigned

comment:2 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:3 by Bob Thomas, 16 years ago

This looks similar to #9041. One of these could probably be marked a dupe.

comment:4 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [10136]) Fixed #9926 -- Fixes for some select_related() situations.

Using select_related(...) across a nullable relation to a multi-table
model inheritance situation no longer excludes results. Thanks to AdamG
for a test demonstrating part of the problem.

comment:5 by Malcolm Tredinnick, 16 years ago

(In [10138]) [1.0.X] Fixed #9926 -- Fixes for some select_related() situations.

Using select_related(...) across a nullable relation to a multi-table
model inheritance situation no longer excludes results. Thanks to AdamG
for a test demonstrating part of the problem.

Backport of r10136 from trunk.

comment:6 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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