title: Django model method to get recursive children in M2M table inheritance
body: <p>I am using table inheritance in Django and the base <code>ModelA</code> has a ManyToMany recursive field to itself called <code>children</code>. Then I have a <code>ModelB</code> that inherits from <code>ModelA</code>.</p>
  <p>The issue here is that when I query the children of an instance in <code>ModelB</code>, they are pointed to their equivalents in <code>ModelA</code>. What I would like to accomplish is that an instance of <code>ModelB</code> would return a queryset of children also of <code>ModelB</code>. I can do this using a method <code>_children</code> so it doesn't collide with the field name and have it return the correct model instances.</p>
  <p>Is there any way that I could instead have <code>modelB.children.all()</code> return the children with the correct model?</p>
  <p>I know I could use <code>_children()</code> but I would like to call it as an <code>attribute</code> and not a <code>method()</code>.</p>
  <p>The reason for all of this is that the table inheritance was added later in the game and all the instances will be migrated to these new models soon. Plus, <code>children</code> is broadly used in my project so it would be a hassle to change it all to <code>_children</code>.</p>
  <pre class="lang-py prettyprint-override"><code>class ModelA(models.Model):
      id = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4)
      children = models.ManyToManyField(
          'self',
          related_name='parents',
          symmetrical=False
      )
  
      def _children(self):
          return type(self).objects.filter(id__in=self.children.all())
  
  
  class ModelB(ModelA):
      #Set of fields
  </code></pre>