#30138: Allow QuerySet.bulk_create() to set pk of created objects when
ignore_conflicts=True
-------------------------------------+-------------------------------------
Reporter: saber-solooki | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Old 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.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/30138#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.64d14d7f36b1e75f7cbfeb1e3e157cb5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.