Ticket #18343 -- Cleaned up deferred model implementation #80

wants to merge 2 commits into


None yet

1 participant

Django member

Removed some dead-code, and some dump logic in deferred field loading
and deferred model reduce(). The biggest user visible change is
that primary keys do not need fetching from the DB in some inheritance

All tests pass on SQLite.

@akaariai akaariai [1/2] #18343 -- Cleaned up deferred model implementation
Generic cleanup and dead code removal in deferred model field loading
and model.__reduce__().
Django member

I splitted the patches into two for easier review.

@akaariai akaariai [2/2] #18343 -- deferred model pk handling in inheritance case
Assuming an inherited model with parent_ptr_id -> id, doing a deferred
load and then fetching the id field would cause a database query, even
if the id field's value is already loaded in the parent_ptr_id field.
Django member

Pushed in manually

@akaariai akaariai closed this May 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment