#19527: Allow QuerySet.bulk_create() to set the primary key of its objects
-------------------------------------+-------------------------------------
Reporter: Tuttle | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
QuerySet.bulk_create |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akaariai):
I see your point.
The problem is that 3rd party apps are forced to skip bulk_create for all
backends because the app might be used on backend that doesn't support
fetching primary keys. Thus users of postgres pay for limitations in
MySQL.
The solution might be a method like maybe_bulk_create() - insert data as
fast as possible, with bulk_create() if the backend supports returning
primary keys, with loop and save() otherwise.
--
Ticket URL: <https://code.djangoproject.com/ticket/19527#comment:36>
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/064.e18a20781e81e01233c9b4f8d9e9b8c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.