diff options
| author | Claude Paroz <claude@2xlibre.net> | 2021-05-17 09:19:18 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-07-07 10:15:51 +0200 |
| commit | 1d53d2502d8b093641dbbb741a232b436c9022c0 (patch) | |
| tree | 25d50dac803f4634d4eb54fca2148e768b344486 /docs | |
| parent | 9fadb97583a6246fbce8a70714e3ebd54b90f45c (diff) | |
[3.2.x] Documented in_bulk behavior with nonexistent id_list items.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Backport of 7309393c3a7dea7a34a1446e102df7432c4e7357 from main
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/querysets.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index c840b6cd89..b47d509e63 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2299,7 +2299,10 @@ database query like ``count()`` would. Takes a list of field values (``id_list``) and the ``field_name`` for those values, and returns a dictionary mapping each value to an instance of the -object with the given field value. If ``id_list`` isn't provided, all objects +object with the given field value. No +:exc:`django.core.exceptions.ObjectDoesNotExist` exceptions will ever be raised +by ``in_bulk``; that is, any ``id_list`` value not matching any instance will +simply be ignored. If ``id_list`` isn't provided, all objects in the queryset are returned. ``field_name`` must be a unique field or a distinct field (if there's only one field specified in :meth:`distinct`). ``field_name`` defaults to the primary key. |
