#33770: Add bulk_update() support for unique fields instead of only primary key
-------------------------------------+-------------------------------------
Reporter: Ebram Shehata | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 4.0
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: models, orm | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
Hi Ebram.
Yes, I'm following the thread there.
Jerch's reply seems positive: "Overall this sounds like a valuable API
addition to bulk_update…" but he raises the complexity of the MTI case,
and also whether it's needed:
> NB: Btw fetching proper pks upfront from some other unique field is
> typically very cheap compared to bulk_update runtime itself, given you
> have indexed those columns.
Short of further input, if you're keen to keep working on this, I'd
suggest adding some tests for the MTI case, and making that work. From
there — assuming it's not too complex -- you have a decent case for a
quality of life improvement.
--
Ticket URL: <https://code.djangoproject.com/ticket/33770#comment:3>
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/010701818f6f1cbe-9098afcc-5d39-44cb-8460-b32ba2435b56-000000%40eu-central-1.amazonses.com.