Creating and Deleting Unique Keys

You can create a unique key to make sure that two objects cannot be saved with the same values for the attributes of your choice. You can also delete the unique keys you have created.

Note: You cannot edit unique keys.

This task shows you how to:

Create a Unique Key

You can create unique keys when Enterprise IP Schema Specialization is in the development environment.

Before you begin:
  • Your Enterprise IP Schema Specialization widget is in the development environment.
  • The types and attributes groups whose attributes you want to constrain must not have been imported or exported; that is, they do not have any red or orange lock on their tiles.
  • All the objects saved in the database, if any, already comply with the unique key you are about to create. In other words, there are no saved objects in the database with the same values for the attributes you are about to constrain with a unique key.
  1. From the navigation menu, click Unique keys.
  2. Click Create a new unique key.
    The Create a new Unique key dialog box opens.
  3. In the Name field, enter a name for your unique key.
  4. From the Contrained Type field, select the type whose attributes you want to constrain with the unique key.

    Only the types whose attributes you can select in step 6 are displayed; that is, all lock-free OOTB types that have at least one attribute group, and all lock-free specialization types.

  5. Optional: From the Constrained Attribute Group field, select the attribute group you want to constrain.
  6. From the Constrained Attributes field, select the attributes you want to constrain.

    If you selected an OOTB type in step 4, you can only select attributes from its existing attribute groups; you cannot select own attributes.

The unique key is created and automatically activated.

If activation fails, for example, when there already are saved objects in the database with the same values for the attributes you selected in step 6, the unique key is automatically deleted and an error is displayed.

You cannot modify a unique key after its creation; you can only delete it.

Delete a Unique Key

You can delete unique keys from Enterprise IP Schema Specialization that is either in the development or in the production environment.

Recommendation: Enterprise IP Schema Specialization is in the development environment.

  1. From the navigation menu, click Unique keys.
  2. Click the tile of the unique key you want to delete to open it.
  3. Click Delete unique key.

    Warning: There is no confirmation message and this action is irreversible. If you want to restore a unique key you deleted, you must create it again.

The unique key is deleted.

Note: If you then import a specialization that contains the deleted unique key, this unique key will be reintroduced into Enterprise IP Schema Specialization. For more information, see Import Specializations.