#34549: Extra select query when parent model consists of primary key only
-------------------------------------+-------------------------------------
Reporter: Akash | Owner: nobody
Kumar Sen |
Type: Bug | Status: new
Component: Database | Version: dev
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Capturing one extra select query instead of update as expected in #30382
when the parent model contains the primary key field only.
{{{
1. SELECT 1 AS "a" FROM "force_insert_update_parentmodel" WHERE
"force_insert_update_parentmodel"."id" = 1 LIMIT 1
2. INSERT INTO "force_insert_update_parentmodel" ("id") VALUES (1)
3. INSERT INTO "force_insert_update_childmodel" ("parentmodel_ptr_id")
VALUES (1)
}}}
Reproduced here : https://code.djangoproject.com/ticket/30382#comment:9
--
Ticket URL: <https://code.djangoproject.com/ticket/34549>
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/01070187fe220d63-fb54c2dd-af5a-4a3d-b15a-cca53539eb7a-000000%40eu-central-1.amazonses.com.