I have structures called Instrument and Person. On the person structure, I have a Matrix field called Roles. Roles has a block called Musician. And That block type has a Relationship Field called Instrument.
This allows someone to be a musician and to be assigned an instrument.
In my template I need to output each Instrument as a section, and all of the musicians that play that instrument.
I think this issue has something to do with the relationship being added in a Matrix block rather than on the entry itself.
Unfortunately there are many roles (block types) that a person can have, each with different fields. I tried to solve this by swapping to Instruments as categories but that doesn't seem to be working either. Here's some sample code I've been playing with:
{% for instrument in craft.entries.section('instrument') %}
<h3>{{ instrument.instrumentName }}</h3>
{% for person in craft.entries.section('person').relatedTo( instrument ) %}
<p>{{ person.personName }}</p>
{% endfor %}
{% endfor %}