Show TOC

Entity SetsLocate this document in the navigation structure

Use

Use entity sets in your Service Builder project to group instances of an entity type together with instances of any type that are derived from this particular entity type. While an entity type describes a data structure, an entity set contains the instances of the given structure.

For more information about entity types, see Entity Types.

Creating an Entity Set

To create an entity set in your Service Builder project, proceed as follows:

  1. Right click the Data Model folder, and choose Create, and then select Entity Set.

    Also, you can create a new Entity Set when you right click the Entity Set folder, and choose Create.

    The Create Entity Set dialog box opens.

  2. Specify the Entity Set name and the related Entity Type.

Procedure

Alternatively, use the following steps:

  1. Expand the Data Model folder in the tree view of your project.

  2. Double-click the Entity Sets folder to open the mass maintenance view.

  3. Click Edit in the mass maintenance view and then select Insert Rowto add a new row to the table for the new entity set.

  4. In the Name column, enter a name for the entity set you want to create. You must enter a name in this column. For example, enter NEW_ENTITY_SET.

  5. In the Entity Type Name column, enter the name of an existing entity type or your project or search for an entity type in your project using the input help.

  6. In the Label column, enter a label for the new entity set. You can enter a free-text label directly or use the Label Text Reference Editor to enter the reference type, for example, program, data element, class or program. The reference type you select influences which of the other input fields (that is, Object Name, Key, and Label you can, and need to, edit.

  7. You can define the following optional attributes for the entity set:

    Column

    Description

    Semantics

    Specifies how the entity set is to be used in your service implementation.

    Creatable

    Select to indicate that creation is supported by your service implementation.

    Updatable

    Select to indicate that updating is supported by your service implementation.

    Deletable

    Select to indicate that deletion is supported by your service implementation.

    Pageable

    Select to indicate that paging is supported by your service implementation.

    Addressable

    Select to indicate that the addressable function is supported by your service implementation.

    Searchable

    Select to indicate that searches are supported by your service implementation.

    Subscribable

    Select to indicate that subscriptions are supported by your service implementation.

    Requires Filter

    Select to indicate that a filter is required by your service implementation. If you select this checkbox, the entity set cannot be accessed directly and cannot be queried without a $filter expression.

  8. Click Save to create the new entity set.

Note

To delete an existing entity set, select the entity row in the mass maintenance view and click Delete Row.