title: How to create Django Model with Many-To-Many Parents-Children Relationship?
body: <p>I already know, that I can achieve ForeignKey Parent-Children relationship within the same model, that allows to create relations with 1 parent = multiple children. But how can I accomplish Many-To-Many relationship within the same model ? At this moment I wrote and tested this:</p>
  
  <pre><code>class Person(models.Model):
      user = models.OneToOneField(User, on_delete=models.CASCADE)
      parents = models.ManyToManyField(
          'self', blank=True
      )
  </code></pre>
  
  <p>And it works, but not as I expected. What it does is:</p>
  
  <pre><code>john = Person.objects.get(id=1)
  sam = Person.objects.get(id=2)
  
  &gt;&gt;&gt; john.parents.all()
  &lt;QuerySet [&lt;Person: Alex&gt;, &lt;Person: Peter&gt;, &lt;Person: Sam&gt;]&gt;
  &gt;&gt;&gt; sam.parents.all()
  &lt;QuerySet [&lt;Person: John&gt;]&gt;
  </code></pre>
  
  <p>As you can see, Sam was supposed to be child of John, not his child and parent at the same time. What I want is to get John when I'm retrieving sam.parents.all() But not to get Sam when I'm retrieving john.parents.all()</p>
  
  <p>Is there a way to accomplish what I want ? Or that's not gonna work with this logic at least ? Do I have to create second separate model withing the same app ?</p>