Opened 6 years ago
Last modified 4 months ago
#30138 new Cleanup/optimization
Allow QuerySet.bulk_create() to set pk of created objects when ignore_conflicts=True — at Version 1
Description (last modified by ) ¶
As requested in ticket:28668#comment:24, here's a ticket for setting the primary keys of created objects. I tried it in PostgreSQL 10.6 and this could be supported. When ignore_confilicts=True
, Django doesn't put ' RETURNING "mymodel"."id" '
in the query.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (1)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|---|
Summary: | Return pk of created objects when ignore_conflicts set True on QuerySet.bulk_create() → Allow QuerySet.bulk_create() to set pk of created objects when ignore_conflicts=True |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |