#31071: Change in behaviour when saving a model instance with an explcit pk
value
if the pk field has a default
-------------------------------------+-------------------------------------
Reporter: Reupen Shah | Owner: Simon
| Charette
Type: Bug | Status: closed
Component: Database layer | Version: 3.0
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"5779cc938a34eb96815c7a40ded2c8f6c8087c58" 5779cc93]:
{{{
#!CommitTicketReference repository=""
revision="5779cc938a34eb96815c7a40ded2c8f6c8087c58"
Fixed #31071 -- Disabled insert optimization for primary keys with
defaults when loading fixtures.
Model.save_base() is called directly when loading fixtures and assumes
existing rows will be updated. Branching of "raw" allows to maintain
the optimization introduced in #29260 while supporting this edge case.
Regression in 85458e94e38c20e57939947ee515a1a53689659f.
Thanks Reupen Shah for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31071#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.82c5185b045cf2a7272553dc97e14053%40djangoproject.com.