Working in the Properties View

The Properties View allows you to edit OData properties. These properties are used to define the different artifacts in the model.

Each artifact displays a different set of attributes according to the OData specifications. When you change the selection of an artifact in the OData Model Editor or in the project explorer tree, the attributes displayed in the Properties View change accordingly.

Note When selecting an artifact in the OData Model Editor its properties are displayed in the Properties view in read-only mode.
When you change an attribute in the OData Model Editor, the changes are reflected automatically in the Properties view and vice-versa. For example, you can change the name of the artifact in either place and it will be updated in both. The Properties view also allows you to change attributes that are not editable in the OData Model Editor, for example, changing the name of the schema.
To display the Properties view:
  1. Select Window> Show View> Other. The Show View dialog is displayed
  2. Select General> Properties.. The Properties view is displayed.
To edit the properties of OData artifacts:
  1. Select the desired artifact.
  2. From the General tab, give the desired value to the artifact’s attributes displayed.
Referential Constraints

A referential constraint asserts that the entity on the principal end of the referential constraint must exist in order for the entity on the dependent end to exist. This assertion is established by the edm:ReferentialConstraint element.

A referential constraint must contain exactly one edm:Principal element and exactly one edm:Dependent element.

To maintain association referential constraints:
Note Referential constraints are not relevant for associations in a many to many relationship.
  1. Select desired association. The association’s attributes are displayed in the Properties view.
  2. Select Referential Constraint.
  3. In the Value column, choose Mountain View. The Referential Constraint page is displayed.
  4. From the Principle drop-down list, select the entity with the principal role. The Dependent column is filled in automatically with the second entity in the association.
    Note If the association is 1:many, the entity from which the association goes to many is automatically selected as Principal.
  5. In the Principle Key column, select the property key that will act as lead in the association.
    Note The properties displayed in the Principal Key column, depend on the properties defined as Key in the OData Model Editor.
  6. From the Dependent Property drop-down list, select the desired property to be dependent on the principal key.
    Note You cannot use the same property for two different Principle keys.
  7. Choose OK. The referential constraint is displayed in the Value column of the Properties Editor.
To delete a referential constraint:
  1. Select desired association. The association’s attributes are displayed in the Properties view.
  2. Select Referential Constraint.
  3. In the Value column, choose . The Referential Constraint page is displayed.
  4. Choose Delete. All the referential constraints for these entities are deleted.
To maintain association set:
  1. Select desired association. The association’s attributes are displayed in the Properties view.
  2. Select Association Sets.
  3. In the Value column, choose . The Association Sets page is displayed. On the displayed page you can see a table with the association set properties (name of the association set, end1 entity set, and end2 entity set).
  4. To add a new association set, choose the Add.
  5. To delete an association set, select it from the table and choose Remove.
  6. To edit the name of the association set, in the Name column, select the desired name and edit it.
  7. To change an entity set of the association set, select the desired entity set and change it by selecting a different one from the drop-down list.
  8. Choose Apply.

Annotations

You can apply annotations to OData artifacts from the Properties View Annotations tab.

Note The Annotations tab is enabled only when an OData artifact that supports annotations is selected.
To apply annotations to an OData artifact:
  1. Select the desired artifact from the model and choose (maintain annotation) from the Properties view toolbar. The Maintain Annotation page is displayed showing the available (loaded) vocabularies. These vocabularies contain the applicable terms for the selected artifact.
  2. Expand the desired vocabulary.
    Note If terms have already been selected for this vocabulary, they appear in the list with thier checkbox selected.
  3. If the desired vocabulary is missing, you can add it manually using the edmx references. For more information see the Adding EDMX References topic.
  4. Select the checkbox of the desired term(s).
  5. When finished, choose OK. The annotations tab is displayed in the Properties view.
  6. You can edit each term in the Value column according to the term's limitations.

 

To edit simple value annotations:
  • Entering the appropriate value (according to the annotation type).
  • Selecting an artifact from the Value drop-down list. If there are other artifacts of the same type (for example, edm.string type), they are displayed in the drop-down list.
Note For Boolean annotations, the drop-down list contains True, False, and Artifacts of type Boolean (in this case you cannot enter the value).
Note If the term is annotated with the annotation isPropertyPath, you can choose its value only from the drop-down list . You can check the annotations for the terms in each of the vocabularies. To acces the vocabularies provided out-of-the-box, go to the OASIS repositories webpage.

Annotations of type record can contain simple value annotations and annotation collections within them. To see what the record annotiation is composed of, expand the term cell.

To edit record annotations:
  • Edit the simple value annotations.
  • Edit collections:
    1. selecting the value cell and choosing . The Maintain Dynamic Annotation dialog is opened.
    2. Expand the collection to set the value for each annotation.
    3. To add a collectable expression, select the desired collection row and choose Add.
    4. To remove a collectable expression, select the desired collectable expression's row and choose Remove.