#8437: Feature Request: distinct_between('team_home', 'team_away') similar to
unique_together
------------------------------+---------------------------------------------
Reporter: ritlim | Owner: nobody
Status: new | Milestone:
Component: Database wrapper | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------+---------------------------------------------
{{{
class Game(models.Model):
team_home = models.ForeignKey(Team, related_name="games_home")
team_away = models.ForeignKey(Team, related_name="games_away")
class Meta:
distinct_between = ('team_home', 'team_away')
}}}
"distinct_between" should add this constraint to the database:
{{{ CHECK(team_home IS DISTINCT FROM team_away) }}}
--
Ticket URL: <http://code.djangoproject.com/ticket/8437>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---