Opened 12 years ago
Closed 12 years ago
#19651 closed New feature (wontfix)
Non-reflexive recursive many-to-many relation.
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi, I have a non reflexive recursive many to many relation in my app, and thought it'd be cool to have some default validation for this, instead of having to roll my own every time.
The relation I'm talking about is a twitter-like 'follow' relation between users, where users shouldn't be able to follow themselves (thus it's non-reflexive).
Note:
See TracTickets
for help on using tickets.
It's not entirely clear what you are proposing. Since you have categorised this as database layer, it sounds like you are looking for a keyword argument to be added to
ManyToManyField
to enforce this validation.I really don't think this specific validation rule, which only applies to many-to-many relations to the same model, is common enough to warrant support at the database level, so I'm going to close as WONTFIX.