diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-15 03:45:32 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-03-15 03:45:32 +0000 |
| commit | 97321c7645f200333bc43ac2f4a22d78dd4154ea (patch) | |
| tree | a579968ea9ebbca4b53a6056f52bfa9f3cfb3a26 /docs/topics | |
| parent | 0eac35ce119f108d2ffaeea745101cc3c4a85b98 (diff) | |
[1.0.X] Use plain model.Manager, or suitable proxy, for model saving.
We can't use the default manager in Model.save_base(), since we need to
retrieve existing objects which might be filtered out by that manager. We now
always use a plain Manager instance at that point (or something that can
replace it, such as a GeoManager), making all existing rows in the
database visible to the saving code.
The logic for detecting a "suitable replacement" plain base is the same as for
related fields: if the use_for_related_fields is set on the manager subclass,
we can use it. The general requirement here is that we want a base class that
returns the appropriate QuerySet subclass, but does not restrict the rows
returned.
Fixed #8990, #9527.
Refs #2698 (which is not fixed by this change, but it's the first part of a
larger change to fix that bug.)
Backport of r10056 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10059 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
0 files changed, 0 insertions, 0 deletions
