Sitecore Content Hub - editing the User schema definition
The User schema is locked in Content Hub!
See for yourself: {your-content-hub-environment}/en-us/admin/definitionmgmt/detail/4
Locked, so this means that you cannot add properties/members on it directly. But there are several other ways in which you can add properties to it. Just not so direcly as I wanted it to be.
- Use a child relation
This means that the other entity that has a relation to User and will be the parent.
This could be good in some situations. But take in mind that you will not be able to use your User in facets since it is not the parent.
Read more about this here: https://www.koenheye.be/sitecore-content-hub-relationship-not-visible-in-search/
Maybe there is a way to have it setup as a parent relation? See further down below 😄 - Use the Enable\Disable button on your entitity to enable OOTB functionalities which do create Parent relationships on User
Go to the definition in your Content Hub environment and click on the 3 dots menu. Then select Enable\Disable:
This will allow you to add a plethora of Content Hub options:
- Final solution and probably most fitting for most cases:
Go to the schema of your choice that needs a relation towards User and create a Taxonomy relation.
A Taxonomy releation actually always creates a relationship where the schema that you are editing will be the CHILD. So when creating a relation with User, User will be the parent.
And this is exactly the relationship that I need for my setup. I was focused on adding relations to my schema's through the 'Add relation' functionality that I didn't think of using a Taxonomy relation.
You can easily see the difference between the orientation of a relationship.
For example when adding a relation to P.PCM.Product and choosing for Relation, you'll see M.PCM.Product is Parent of M.Action (the default selected definition).
And when choosing for Taxonomy, you'll see M.PCM.Product is Child of M.Agent