Skip to content
Browse files

Fixed #702 - Documented that ManyToMany fields can't be in unique_tog…

…ether; thanks poirier for the patch.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9fe578c commit 060783d52ddf73f4b538526a917a19006258149e @timgraham timgraham committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 docs/ref/models/options.txt
6 docs/ref/models/options.txt
@@ -247,6 +247,12 @@ Django quotes column and table names behind the scenes.
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.

0 comments on commit 060783d

Please sign in to comment.
Something went wrong with that request. Please try again.