#31003: Suggesting: Documentation update for bulk_create method
-------------------------------------+-------------------------------------
Reporter: Fizzizist | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: bulk_create, | Triage Stage: Accepted
database, query, |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Baptiste Mispelon):
You can see the code for `bulk_create` over there:
https://github.com/django/django/blob/master/django/db/models/query.py#L514
As it is now, it returns the same object as the one that was passed to the
function, so it is in the same order.
However, I'm not sure if this behavior is guaranteed because there don't
seem to be any tests for it (I changed the code to reverse the list before
returning it and the test suite still passes).
It would be good to add a test for the behavior at the same time as you're
documenting it (there's a dedicated file for the `bulk_create` tests
located there:
https://github.com/django/django/blob/master/tests/bulk_create/tests.py).
--
Ticket URL: <https://code.djangoproject.com/ticket/31003#comment:2>
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/067.9b10130eadab95ac6877ce8c6925821c%40djangoproject.com.