Branch: refs/heads/master
Home: https://github.com/django/django
Commit: b6c356b7bb97f3d6d4831b31e67868313bbbc090
https://github.com/django/django/commit/b6c356b7bb97f3d6d4831b31e67868313bbbc090
Author: Anssi Kääriäinen <[email protected]>
Date: 2012-06-26 (Tue, 26 Jun 2012)
Changed paths:
M django/db/models/query.py
M django/db/models/query_utils.py
M django/db/models/sql/compiler.py
M django/db/models/sql/query.py
M docs/ref/models/querysets.txt
M tests/modeltests/defer/tests.py
M tests/regressiontests/defer_regress/models.py
M tests/regressiontests/defer_regress/tests.py
M tests/regressiontests/select_related_regress/tests.py
Log Message:
-----------
Fixed #17485 -- Made defer work with select_related
This commit tackles a couple of issues. First, in certain cases there
were some mixups if field.attname or field.name should be deferred.
Field.attname is now always used.
Another issue tackled is a case where field is both deferred by
.only(), and selected by select_related. This case is now an error.
A lot of thanks to koniiiik (Michal Petrucha) for the patch, and
to Andrei Antoukh for review.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.