This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

CMDBClassRelationship structure

The CMDBClassRelationship structure holds the relationship information of the CI classes.


typedef struct CMDBClassRelationship
{
   CMDBClassNameID relClassNames[2];
   ARNameType roleNames[2];
   unsigned int cardinality;
   ARBoolean isRole2WeakReference;
   CMDBWeakPropagatedAttrsList weakPropagatedAttrsList;
   ARBoolean cascadeDelete;
} CMDBClassRelationship;



The CMDBClassRelationship structure consists of the following elements:

relClassNames[2]

The names of the two classes that are a part of the relationship.

roleNames[2]

The role names for the two classes that are a part of the relationship.

cardinality

An integer identifying the cardinality of the relationship between the related classes:

  • 1 --One-to-one, one instance of a class is associated with a single instance of another class (CMDB_CLASS_RELATIONSHIP_CARDINALITY_1 ).
  • 2 --Many-to-one, one or more instances of a class are associated with one instance of another class (CMDB_CLASS_RELATIONSHIP_CARDINALITY _MANY_1 ).
  • 3 --One-to-many, one instance of a class is associated with one or more instances of another class (CMDB_CLASS_RELATIONSHIP_CARDINALITY_1 _MANY ).
  • 4 --Many-to-many, many instances of a class are associated with many instances of another class (CMDB_CLASS_RELATIONSHIP_CARDINALITY _MANY_MANY ).

isRole2WeakReference

A Boolean value indicating whether role 2 is a weak reference:

  • TRUE --The role 2 class is a weak reference. Role 2 is a weak entity and it uses role 1's primary key as part of its own key. If the value is TRUE, cardinality must be one-to-one or many-to-many.
  • FALSE --The role 2 class is not a weak reference.

weakPropagatedAttrsList

If the value of isRole2WeakReference is TRUE, indicates the list of attributes that are propagated from the role 1 class to the role 2 class.

cascadeDelete

A Boolean value indicating the type of delete allowed between the related classes:

  • TRUE --A cascade delete is allowed. Deleting an instance in one class also deletes the instance in the related class.
  • FALSE --A cascade delete is not allowed.
  • This item is applicable only for one-to-one and one-to-many relationships.

Was this page helpful? Yes No Submitting... Thank you

Comments