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.
You can manage relationships in the following ways:
-
The admin console. Learn more in Configure relationships.
-
The Schema API. Learn more in Schema.
| Only use the admin console or the Schema API to manage relationships. Using other methods might cause your data to de-sync. |
|
When you create a relationship, Advanced Identity Cloud writes the reference to the managed object on the forward (owning) side. If many objects are concurrently created and each forms a relationship to the same shared object, place the forward (owning) side on the objects being concurrently created, not on the shared object. Writing to a single shared object from many concurrent operations increases the risk of write conflicts and failed requests. Learn more in Relationship storage considerations and limits. |
Manage custom relationship properties in the admin console
You can create, modify, and delete custom relationship properties in the admin console.
Learn more in Manage relationships.
Objects are limited to 10 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 have one, many, or none of the other side. For instance, custom_Managers might have many custom_Employees, while custom_Employees have only one custom_Managers.
To change the cardinality of a custom relationship, update the managed object schema directly.
|
When you change the configuration of a custom relationship, existing objects which contain that custom relationship aren’t automatically updated to match the new configuration. Ensure your data is updated to reflect the new relationship configuration. For example, suppose |
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 Advanced Identity Cloud reuses the deleted reference attribute for other data.
Before you delete a custom relationship property, find all the managed objects 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 "Authorization: Bearer <access-token>" \ --header "Accept-API-Version: resource=2.0" \ --request GET \ "https://<tenant-env-fqdn>/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.