Zastanawiam się, czy istnieje odpowiednik "dodaj wszystko" lub "masowe tworzenie" dla wielu do wielu relacji, które zmniejszają liczbę zapytań (zrobię to dla długa lista)?django 1.4 Wiele-to-luzem dodać
Docs na ten temat wydają się sugerować, że nie jest to możliwe:
https://docs.djangoproject.com/en/dev/topics/db/examples/many_to_many/
**Associate the Article with a Publication:**
a1.publications.add(p1)
**Create another Article, and set it to appear in both Publications:**
a2 = Article(headline='NASA uses Python')
a2.save()
a2.publications.add(p1, p2)
a2.publications.add(p3)
Właściwie wyraźne stół pośredni nie jest konieczne, patrz http://stackoverflow.com/a/10116452/5112 –
@Tim Zapomniałem o tym. Dobry połów! – rantanplan