Assume I have two models:
A:
pass
B:
a = foreign_key(A)
Now, I have a query set
bs = B.objects.filter(...)
I want to get all the a of bs, which means every a which is referenced by b for which b is in bs.
Is there a way to do so? I think in sql, a simple join will do, I don't know if django support this.