#28692: QuerySet.bulk_create() combine with select/prefetch_related()
-------------------------------------+-------------------------------------
     Reporter:  Дилян Палаузов       |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.11
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  bulk_create          |             Triage Stage:  Accepted
  select_related prefetch_related    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 No patch was provided and I agree that this will be very hard to implement
 `select_related` in a backend agnostic way. Now that
 
[https://docs.djangoproject.com/en/4.1/ref/models/querysets/#django.db.models.prefetch_related_objects
 prefetch_related_objects] is a documented public API it can be used it to
 achieve the same results as what `prefetch_related` would have done.

 Closing as ''wontfix'' for now, I wouldn't be opposed to reopening once we
 get better support for `RETURNING` handling at the `sql.Query` level if a
 patch is provided.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28692#comment:7>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182ce052ac1-cec9d386-2625-4a23-8022-812af26e23f1-000000%40eu-central-1.amazonses.com.

Reply via email to