Opened 6 years ago
Last modified 7 weeks ago
#30138 new Cleanup/optimization
Return pk of created objects when ignore_conflicts set True on QuerySet.bulk_create() — at Initial Version
Reported by: | saber solooki | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 2.2 |
Severity: | Normal | Keywords: | |
Cc: | Alex Vandiver, Ülgen Sarıkavak, şuayip üzülmez | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
According to https://code.djangoproject.com/ticket/28668#comment:24 comment, I create new ticket for returning pk of created objects. I tried it in Postgresql 10.6 and this subject is supported. I see that when ignore_confilicts set as True, django api doesn't put ' RETURNING "mymodel"."id" ' in query.
Note:
See TracTickets
for help on using tickets.