The optimal way to do this would be a many-to-many relationship between Crew and Films, where Roles was specified via the intermediate post type as a relationship field.
So to demonstrate with your example:
- "Anne Hathaway" (Crew) could connect to the Film "Mothers' Instinct" where the Role field was "Actor" (and the character name would be stored in another field).
- "Anne Hathaway" (Crew) could connect to the Film "She came to me" where the Role field was "Actor" (and the character name would be stored in another field).
- "Anne Hathaway" (Crew) could connect to the Film "The Idea of You" where the Role field was "Producer"
etc.
But - here the disadvantage is:
Toolset doesn't support connecting the same posts more than once, so if the Crew member had more than one role in the same film (e.g. Actor and Executive Producer) this wouldn't be a viable option.
However - You can make multiple relationships involving the same post types.
In that case you will require many-to-many post relationship per role you have.
- To connect Crew Members to Films in a "Actors" relationship (specifically to record connections for Actors), and another Crew Members to Films relationship for "Producers", and others for each role.
So,
- One many-to-many post relationship with post types "Crew" and "Films" for Actors with relationship name "Crew Films Actors" and add your required custom fields to relationship
- One many-to-many post relationship with post types "Crew" and "Films" for Producers with relationship name "Crew Films Producers"
- One many-to-many post relationship with post types "Crew" and "Films" for Authors with relationship name "Crew Films Authors"
Another way I think of is plan B:
- You should have Films, Crew and Roles setup as post types
- Create a one to many post relationship between Films and Roles
- then to the Films post type add a repeating field group where you should add one select field for "Crew", another select field for "Role" and one single line field where you record the information about job-description for the selected crew and role for this pair
But having said that this will be the workaround and needs the use of filters to pre-populate the select fields for "Crew" and "Roles" select boxes.
If you want please let me know if you want to see how it works with plan "B" and I will be happy to demonstrate you the plan "B" structure but it will has its own advantages and disadvantages.
I hope this helps you to understand how you can setup your structure.