Skip to content

Conversation

sinisaos
Copy link
Member

Related to #388 and based on this discussion. These changes will allow adding entries to self-referencing m2m tables. Also, object and select queries allow the use of symmetric many to many relationships on self-referencing tables.

@dantownsend
Copy link
Member

I've never tried self-referencing M2M columns. I'll try and play around with it a bit.

@sinisaos
Copy link
Member Author

Me neither, but you can look at the discussion (from the comments) to see what the user was looking for. The most obvious example is Twitter user-follower model. This PR allows:

  1. Enable data to be added to self-referencing many-to-many relationships (we can't do this with the existing code)
  2. Querying data in both directions (a bidirectional argument which is the same as symmetrical in Django) because without that we can't get correct results. You can look at the PR tests to see what I mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants