How do you get a field related by OneToOneField and ManyToManyField in Django?
<p>How do you get a field related by OneToOneField and ManyToManyField in Django?</p>

<p>For example,</p>

<pre><code>class A(models.Model):
    myfield = models.CharField()
    as = models.ManyToManyField('self')
class B(models.Model):
    a = models.OneToOneField(A)
</code></pre>

<p>If I want to get a 'myfield' and all associated 'as' using class B, given a 'myfield' equal to a string like 'example', how is it done?</p>