PingIDM 7.5.0

Manage custom relationship properties

Custom relationship properties allow you to define custom relationships between managed objects. For example, you could model a parent-child relationship by creating the custom_Parents and custom_Children properties and configuring them as one-way one-to-many relationships.

Create a custom relationship property

To create a custom relationship property using the admin UI:

  1. From the top navigation menu, click Configure > Managed Objects.

  2. Select a managed object type.

  3. Click Add a Property. An entry field displays.

  4. In the Name field, enter a name for the custom relationship property.

  5. From the Type drop-down, select Relationship.

  6. Click Next. The Add Resources modal displays.

  7. From the Resource drop-down, select the resource to map the custom relationship property to.

  8. From the Display Properties drop-down, select the properties on the resource to map to the custom relationship property.

  9. Click Save. The Relationships Property screen for the new relationship property displays.

Objects are limited to 5 custom relationships. If you need an object to have more, create custom relationships from the related object and map them to the original object.

Update a custom relationship

You can adjust a custom relationship’s cardinality by configuring each side of the relationship to be have one, many, or none of the other side. For instance, custom_Managers may have many custom_Employees, while custom_Employees have only one custom_Managers.

To change the cardinality of a custom relationship using the admin UI:

  1. From the top navigation menu, click Configure > Managed Objects.

  2. Click the managed object type which has the relationship property to modify.

  3. Click the relationship property to modify.

  4. In the Relationship Configuration section, click the cardinality relationship name associated with the arrow indicating the direction of the relationship. A popover displays.

  5. From the Relationship drop-down on the popover, select the cardinality of the relationship. The Changes Pending notification displays in the lower left of the UI.

  6. Click Save.

When you change the configuration of a custom relationship, existing objects which contain that custom relationship are not automatically updated to match the new configuration. Ensure your data is updated to reflect the new relationship configuration.

For example, suppose custom_Doctors have many custom_Patients and custom_Patients have many custom_Doctors. The rules change and now custom_Patients have one custom_Doctor. In addition to updating the custom relationship’s cardinality in the configuration, you must also update all existing custom_Patients with more than one custom_Doctor to have at most one.

Delete a custom relationship property

Existing objects are not automatically updated when you delete a custom relationship property. When you delete a custom relationship property, you must also update the existing objects to no longer reference them. Failing to do this may result in the "orphaned" data unpredictably reappearing if PingIDM reuses the deleted reference attribute for other data.

Before you delete a custom relationship property, find all of the managed objects which are in the custom relationship and either modify or delete the data. The following REST API query returns all managed users with the property custom_Example:

curl \
--header "X-OpenIDM-Username: openidm-admin" \
--header "X-OpenIDM-Password: openidm-admin" \
--header "Accept-API-Version: resource=2.0" \
--request GET \
"https://localhost:8443/openidm/managed/user?_queryFilter=/custom_Example+pr&_pageSize=30"

For more information on using the REST API to manage custom relationship properties, refer to Schema.