#18285: bulk_create and ManyToMany relationships: the relationship is actually not made -------------------------------------+------------------------------------- Reporter: Michael PALUMBO | Owner: nobody <michael.palumbo87@…> | Status: new Type: | Version: 1.4 Cleanup/optimization | Resolution: Component: Documentation | Triage Stage: Accepted Severity: Normal | Needs documentation: 0 Keywords: bulk_create, | Patch needs improvement: 0 relationship | UI/UX: 0 Has patch: 0 | Needs tests: 0 | Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by moritzs):
* component: Database layer (models, ORM) => Documentation * type: Bug => Cleanup/optimization Comment: [https://docs.djangoproject.com/en/1.4/ref/models/querysets/#bulk-create Documentation] says: >This has a number of caveats though: > >* The model's save() method will not be called, and the pre_save and post_save signals will not be sent. >* It does not work with child models in a multi-table inheritance scenario. >* If the model's primary key is an !AutoField it does not retrieve and set the primary key attribute, as save() does. There is a reason why the bulk_create method does not call the models' save methods. It should be a fast alternative to call the models' save methods in a loop. So I think the documentation should be clarified rather then modifying bulk_create. -- Ticket URL: <https://code.djangoproject.com/ticket/18285#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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.