#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 Tuttle):

 Replying to [comment:34 akaariai]:
 > A safe-but-slow implementation is to resort to one item at time insert
 if primary keys are requested.

 If I may, I'd prefer to trust users they know their situation and
 limitations. No magic fallbacks. I love Django for its doing what it's
 saying.

 IMHO once the user demands bulk insert, then fast bulk insert should
 always be done and when PKs are requested on an unsupporting backend, I'd
 expect an not-implemented error with the explanation and recommendation
 raised. This get caught during development, right?

 Personally, I don't mind at all if at these not essential cases, the
 framework transparently admits that all backends are not the same.

 Many thanks to everyone involved so far! I'm looking forward to the
 feature much!

--
Ticket URL: <https://code.djangoproject.com/ticket/19527#comment:35>
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.957c10889aef357d0ee2ec8d838ec0d2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to