Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

akaariai
Copy link
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.

Generic cleanup and dead code removal in deferred model field loading
and model.__reduce__().
@akaariai
Copy link
Member Author

I splitted the patches into two for easier review.

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.
@akaariai
Copy link
Member Author

Pushed in manually

@akaariai akaariai closed this May 27, 2012
sztrovacsek pushed a commit to sztrovacsek/django that referenced this pull request Mar 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant