#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
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"7db4ab84394f5ffa588d5d968f6b76178740fb51" 7db4ab84]:
{{{
#!CommitTicketReference repository=""
revision="7db4ab84394f5ffa588d5d968f6b76178740fb51"
[3.0.x] 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.
Backport of 5779cc938a34eb96815c7a40ded2c8f6c8087c58 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31071#comment:11>
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.fee407fd347fc94c2f7f8a14c4565144%40djangoproject.com.