#19651 closed New feature (wontfix)

Non-reflexive recursive many-to-many relation.

Reported by: irodrigo17@… 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


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).

Attachments (0)

Change History (1)

comment:1 Changed 15 months ago by lukeplant

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.