Skip to content

Commit

Permalink
Fixed #702 - Documented that ManyToMany fields can't be in unique_tog…
Browse files Browse the repository at this point in the history
…ether; thanks poirier for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
timgraham committed Dec 31, 2011
1 parent 9fe578c commit 060783d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/ref/models/options.txt
Expand Up @@ -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.

``verbose_name``
----------------

Expand Down

0 comments on commit 060783d

Please sign in to comment.