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

Closed
wants to merge 2 commits into
from

Projects

None yet

1 participant

@akaariai
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
cases.

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__().
831c07b
@akaariai
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.
6474daf
@akaariai
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