Step 3: Cast Relationship
A movie has several actors, and an actor plays in several movies. The role — for example Neo — belongs neither to the movie nor to the actor, but to the connection between them. In EP, that is a property of the relationship. Background: Relationships.
Create the Relationship Type
-
Open Administration → Datamodel → Relationship Types and click .
-
Fill in the dialog:
Field Value name has_castlabel / label_plural Cast member / Cast (DE: Besetzung) label_inverse / label_inverse_plural Movie / Movies (DE: Film / Filme) target_type Actor -
Click Submit and open the relationship type.
Add the Role
On the tab Properties of the relationship type, add the property role with Link existing:
| # | Name | Label | Property type | Required |
|---|---|---|---|---|
10 | role | Role (DE: Rolle) | string_property_type/generic | off |
Attach the Relationship to Movie
- Open the entity type Movie and switch to the tab Relationships.
- Click Link existing, select
has_castand click Submit.
Try It
- Open the movie Casablanca from step 2. If it has no tab Cast yet, click Upgrade Entity Type in its header first — the movie was created before the relationship existed.
- In the tab Cast, click Create and link and create the actor Humphrey Bogart. Enter the role Rick Blaine in the relationship properties.
The tab Cast now lists Humphrey Bogart with his role. Open the actor: his tab Movies shows Casablanca — the same relationship, seen from the other side.
Next: Step 4: Label Scripts