Browse files

[1.3.X] Fixed #702 - Documented that ManyToMany fields can't be in un…

…ique_together; thanks poirier for the patch.

Backport of r17314 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 7b9016e commit 580389c588ade9709f54c1494c5af6747011f043 @timgraham timgraham committed Dec 31, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 docs/ref/models/options.txt
@@ -238,6 +238,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 580389c

Please sign in to comment.