Why am I able to update an immutable reference attribute?

Question

A reference attribute has been marked as immutable ("immutableForSources"), but when an update is sent to the referenced entity, the update is not ignored and the entity is updated. Why is this happening, and how do we stop it?

Answer

Reltio is designed to allow updating attributes of a referenced entity, even if they are immutable. For example, even if an Location object is marked as immutable, but changes must be applied, then you can send a request to directly modify the Location (although, not as part of an entity reference that Location). Immutability applies when the entity containing the reference attribute is updated, not when the referenced object is updated.

For Example - 

{
          "uri": "configuration/entityTypes/HCP/attributes/Address",
          "relationshipLabelPattern": "rank - {AddressRank}",
          "referencedAttributeURIs": [
            "configuration/relationTypes/HasAddress/attributes/AddressType",
	    ...
            "configuration/entityTypes/Location/attributes/AddressLine1",
            "configuration/entityTypes/Location/attributes/AddressLine2",
            "configuration/entityTypes/Location/attributes/City",
            "configuration/entityTypes/Location/attributes/Zip",
	    ...
          ],
          "immutableForSources": [
            "SOURCE_SYS_001", "SOURCE_SYS_002"
          ]
        }

In this example, it is defined for the HCP that it is not possible to change address attributes loaded from SOURCE_SYS_001 and SOURCE_SYS_002

References

https://docs.reltio.com/infoandconfig/immutablerefattrs.html

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.