Skip to main content
Version: Next

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​

  1. Open Administration → Datamodel → Relationship Types and click .

  2. Fill in the dialog:

    FieldValue
    namehas_cast
    label / label_pluralCast member / Cast (DE: Besetzung)
    label_inverse / label_inverse_pluralMovie / Movies (DE: Film / Filme)
    target_typeActor
  3. 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:

#NameLabelProperty typeRequired
10roleRole (DE: Rolle)string_property_type/genericoff

Attach the Relationship to Movie​

  1. Open the entity type Movie and switch to the tab Relationships.
  2. Click Link existing, select has_cast and click Submit.

Try It​

  1. 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.
  2. 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