title: How to achieve associative law in django?
body: <p>I have three objects for a model A, B, C
  A is related to B
  and B is related to C
  How can I achieve relation from A to C in django?</p>
  
  <pre><code>class Product(models.Model):
  name = models.CharField(max_length=30)
  similar_product = models.ManyToManyField('self')
  </code></pre>
  
  <p>Suppose I create an object A of model Product and another object B for the same model. and for B, I add A as the similar_product. That will create the relation 
  B -> A and A -> B as well.
  Now I add another product with name C and its similar product is A.
  as A is related to B, I want to assign B as similar product to C also.(De morgan's law)</p>
  
  <p>How can I achieve that?</p>