| Age | Commit message (Collapse) | Author |
|
Reverse o2o fields are now usable with defer.
|
|
|
|
There was an assumption that changing connection.settings_dict changed
also the settings.DATABASES values. This assumption is now gone.
|
|
Connection creation was done in db backend ._cursor() call. This
included taking a new connection if needed, initializing the session
state for the new connection and finally creating the connection.
To allow easier modifying of these steps in subclasses (for example to
support connection pools) the _cursor() now calls get_new_connection()
and init_connection_state() if there isn't an existing connection. This
was done for all non-gis core backends. In addition the parameters used
for taking a connection are now created by get_connection_params().
We should also do the same for gis backends and encourage 3rd party
backends to use the same pattern. The pattern is not enforced in code,
and as the backends are private API this will not be required by
documentation either.
|
|
Thanks m3wolf for the report and akaariai for reproducing the problem.
|
|
|
|
swapped models.
Thanks to rizumu for the report.
|
|
|
|
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem
was that there should have been UNION ALL instead of UNION.
Refs #19351
|
|
F() expressions reuse joins like any lookup in a .filter() call -
reuse multijoins generated in the same .filter() call else generate
new joins. Also, lookups can now reuse joins generated by F().
This change is backwards incompatible, but it is required to prevent
dict randomization from generating different queries depending on
.filter() kwarg ordering. The new way is also more consistent in how
joins are reused.
|
|
Thanks zimnyx for the report.
|
|
The regression was caused by the fix for #13781 (commit
f51e409a5fb34020e170494320a421503689aea0). Reason was leaving
off some crucial lines when resolving a merge conflict.
|
|
The select_related code got confused when it needed to travel a
reverse relation to a model which had different parent than the
originally travelled relation.
Thanks to Trac aliases shauncutts for report and ungenio for original
patch (committed patch is somewhat modified version of that).
|
|
The problem is the same as in #10888 which was reintroduced when
bulk_insert was added. Thanks to Jani Tiainen for report, patch and
also testing the final patch on Oracle GIS.
|
|
The regression was caused by select_related fix for Oracle, commit
c159d9cec0baab7bbd04d5d51a92a51e354a722a.
|
|
This will have a smallish impact on performance. Refs #19276.
|
|
Thanks to Christian Oudard for the report and tests.
|
|
|
|
|
|
jgelens for the original patch.
|
|
for Python 2 object model compatibility methods.
|
|
This is the start of a deprecation path for the depth kwarg on
select_related. Removing this will allow us to update select_related so
it chains properly and have an API similar to prefetch_related.
Thanks to Marc Tamlyn for spearheading and initial patch.
refs #16855
|
|
The dupe avoidance logic was removed as it doesn't seem to do anything,
it is complicated, and it has nearly zero documentation.
The removal of dupe_avoidance allowed for refactoring of both the
implementation and signature of Query.join(). This refactoring cascades
again to some other parts. The most significant of them is the changes
in qs.combine(), and compiler.select_related_descent().
|
|
Thanks delormemarco@gmail.com for the report.
|
|
There was a potential data-loss issue involved -- when clearing
instance's m2m assignments it was possible some other instance's
m2m data was deleted instead.
This commit also improved None handling for to_field cases.
|
|
|
|
|
|
The Query.select and Query.select_fields were collapsed into one list
because the attributes had to be always in sync. Now that they are in
one attribute it is impossible to edit them out of sync.
Similar collapse was done for Query.related_select_cols and
Query.related_select_fields.
|
|
Conflicts:
django/db/backends/__init__.py
django/db/models/fields/related.py
django/db/models/options.py
|
|
Thanks to homm for the report and ramiro for the patch.
|
|
|
|
|
|
|
|
There was a bug introduced in #18676 which caused fast-path deletes
implemented as "DELETE WHERE pk IN <subquery>" to fail if the SELECT
clause contained additional stuff (for example extra() and annotate()).
Thanks to Trac alias pressureman for spotting this regression.
|
|
Thanks maxirobaina for the report.
|
|
|
|
Added values() and values_list() methods to EmptyQuerySet.
|
|
Done for consistency with Q() expressions and QuerySet combining. This
will allow usage of '&' and '|' as boolean logical operators in the
future. Refs #16211.
|
|
This reverts commit 28abf5f0ebc9d380f25dd278d7ef4642c4504545.
Conflicts:
docs/releases/1.5.txt
|
|
RETURNING is an extension of the SQL standard, which is not implemented
the same by all databases. Allow DatabaseOperations.return_insert_id to
return a None to allow for other 3rd party backends with a different
implementation.
|
|
Thanks Preston Holmes.
|
|
Thanks David Hatch and Anssi Kääriäinen for their inputs.
|
|
This fixes a regression created by join promotion logic refactoring:
01b9c3d5193fe61b82ae8b26242a13fdec22f211
Thanks to Ivan Virabyan for the report.
|
|
Refs #18827.
|
|
This non-standard naming was deprecated in Django 1.2.
|
|
|
|
Thanks to Preston Holmes for the suggestion.
|
|
|
|
caches.
Thanks to Ivan Virabyan for the report.
|
|
Work done by Walter Doekes and Trac alias knoeb. Reviewed by Simon
Charette.
|