#24997: Allow bulk_create with proxy inheritance
-------------------------------------+-------------------------------------
     Reporter:  wkschwartz           |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  proxy, inheritance,  |             Triage Stage:  Accepted
  bulk_create, queryset, insert      |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by wkschwartz):

 I think that as a user, I would be surprised if `bulk_create` did not
 execute in single (or very small number of, depending on `batch_size`)
 INSERTs. I can imagine stackoverflow threads asking "How to force
 bulk_create to use single insert," with answers to the effect of, "Back in
 the day, it always executed in a single INSERT but now it's a bit of a
 guessing game". I'm not saying that it would be a guessing game, I'm just
 saying that having `bulk_create` decide what to do will feel opaque to
 users. The current way it works has the advantage of being fully explicit.

 Further, I'm not sure I see such an expansion of `bulk_create`'s duties as
 being germane to allowing proxy models to use the method, except if your
 goal is also to allow multi-table models to use it. But the latter
 consideration seems like it should be a separate ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/24997#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.0f65b24d5161d987052bd33bee43b3ef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to