Skip to main content Skip to complementary content

Adding attributes to entities

You need to define different attributes for the entities you have just created.

Procedure

  1. Expand the business entity Movie and anonymous typeanonymous type, right-click the default Primary Key and then click Edit Element in the contextual menu.
  2. Change the name to Id, and then click OK to close the dialog box.
  3. Right-click Id, click Add Element (after) in the contextual menu, and then add each of the following elements with the characteristics shown in the table below.

    In this example, two custom type attributes SourceURL and Rating are added. For more information, see Defining custom type attributes.

    Element type

    Element name

    Minimum occurrence

    Maximum occurrence

    string

    Title

    1

    1

    int

    ReleaseYear

    1

    1

    RatingType (defined custom type)

    Rating

    1

    1

    URL (default custom type)

    SourceURL

    0

    1

    string

    Director

    0

    1

  4. Save your changes.

    A Validation Result Dialog dialog box opens to show the validation result.

  5. Click OK to close the dialog box.
  6. In the Director entity, change the name of its default element DirectorId to Id and then add the following attribute:

    Element type

    Element name

    Minimum occurrence

    Maximum occurrence

    string

    Name

    1

    1

  7. In the Customer entity, change the name of the default element CustomerId to Id, and change the type of the default element to a default custom type UUID. For more information, see Defining custom type attributes.
  8. Add the following attributes to the Customer entity.
    In this example, an attribute of anonymous complex type MovieInfo is added. For more information, see Adding complex type attributes.

    Element type

    Element name

    Minimum occurrence

    Maximum occurrence

    string

    FirstName

    1

    1

    string

    LastName

    1

    1

    string

    Gender

    1

    1

    int

    Age

    1

    1

    anonymous complex type

    MovieInfo

    0

    1

Results

In the data model Movie, all the entities Movie, Director and Customer are populated with attributes.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!