I have [profile] –M2M–> [group] –FK–> [group category].
Given an instance of [group category], I need to retrieve all related [profile].
(In english: I have members belonging to one or more groups, which are in categories. I need to find all the members in a given category of group).
How do I span the ForeignKey and ManytoMany keys in between? No matter how I slice this, I always end up with an expression from which I can’t define the next backward relationship.
Thank you.
Assuming something like:
You should be able to just query it: