ti...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed ef13b81

Fixed #702 - Documented that ManyToMany fields can't be in unique_together; thanks poirier for the patch.

  • Participants
  • Parent commits 5695fe6
  • Branches default

Comments (0)

Files changed (1)

File docs/ref/models/options.txt

         unique_together = ("driver", "restaurant")
+    A :class:`~django.db.models.ManyToManyField` cannot be included in
+    unique_together (it's not even clear what that would mean). If you
+    need to validate uniqueness related to a
+    :class:`~django.db.models.ManyToManyField`, look at signals or
+    using an explicit :attr:`through <ManyToManyField.through>` model.