public static bool AddObjectDependency(string principalObjUuid, string principalType, string dependentObjUuid, string dependentType, string optionalArg) { bool success = _persistentObj.AddObjectDependency(principalObjUuid, dependentObjUuid, principalType, dependentType, optionalArg); ObjectDto principalObj = OdCepManager.Versioning.GetHeadVersion(Type.GetType(principalType), principalObjUuid, out string comment); ObjectDto dependentObj = OdCepManager.Versioning.GetHeadVersion(Type.GetType(dependentType), dependentObjUuid, out comment); ObjectDto updatedObj = dependentObj.OnPrincipalObjectUpdated(principalObj, optionalArg); updatedObj.VersionIndex++; string c = string.Format(LocalConst.AUTO_SAVE_COMMENT_PRINCIPAL_MODF_TEMPLATE, principalObj.WhoAmI()); ObjectStore.AutoSaveExistingObject(updatedObj, c); return(success); }