﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18285	bulk_create and ManyToMany relationships: the relationship is actually not made	Michael PALUMBO <michael.palumbo87@…>	nobody	"bulk_create with relationships does not work: i.e. the relationship is not made.

For example:
{{{
class Company(models.Model):
    url = models.URLField(unique=True)

class Website(models.Model):
    url = models.URLField(unique=True) 
    companies = models.ManyToManyField(Company, null=True, blank=True)

list_companies = [Company(url='...'), Company(url='...')]
w.companies.bulk_create(list_companies)
-> [< Company:  Company object>, < Company:  Company object>]   #The 2 Company objects are created

w.companies.all()
-> []   # But the relationship is broken
}}}

The 2 companies are created but I cannot access to them through the many-to-many relationship.
I looked at the database and yes I can find the 2 companies in the company table but no rows in the website_company table.

Discussed on django developers group: https://groups.google.com/forum/?fromgroups#!topic/django-developers/VNhDD2Golws
"	Cleanup/optimization	closed	Documentation	1.4	Normal	fixed	bulk_create, relationship		Accepted	0	0	0	0	0	0
