#27970: Allow in_bulk() to use other fields
-------------------------------------+-------------------------------------
               Reporter:  Tom        |          Owner:  nobody
  Carrick                            |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  master
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Currently `in_bulk()` has a very limited set of use-cases, especially
 since a lot of Django users prefer to keep the ID as the PK even when
 another field could be used. It could be expanded to be more useful if it
 could be used on fields other than the ID.

 For backwards compatibility, it should only work on unique fields.

 Proposed syntax: `Foo.objects.in_bulk(['1', '2', 'AB123'],
 field='account_number')`

--
Ticket URL: <https://code.djangoproject.com/ticket/27970>
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/050.2b0cd346ebe5625300dac516cd80287f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to