Managing Global Objects and Object Instances¶
Object Manager is used to define and manage relationships between data tables.
Object: A data table in a relational database, where each row of data stored is called an object instance.
Object Relationship: Specifies the relationship between two objects through a foreign key.
View: Combines fields from one or more objects based on their object relationships.
In Global Object Manager menu, you can configure and manage global objects and object instances that take effect globally, and store data in a centralized manner. After creating object relationships and views, applications can easily query data combined from multiple objects using views.
Configuring Objects¶
Step 1: Creating an Object¶
In the left navigation pane, select Object Manager > Objects.
Choose Create Object and enter the object’s name and identifier, and select its source:
Internal Object: Creates default fields based on the internal object requirements.
Third-Party Object: Third-party objects must be accessed as URIs. Only the default field identifier is created.
Choose Next to enter the configuration field step.
Step 2: (Optional) Configuring Fields¶
Fields serve as the headers for the object and require input values for each mandatory field when creating each object instance. In the Configure Fields step, the default created fields are displayed in the field list, which cannot be edited. New fields can be created as needed.
Choose New Field and enter the following in the popup:
Field Name: Serves as the header name for the object.
Identifier: The unique identifier for the field.
Alias: Further distinguishes the field with an alias.
Data Type: Configure maximum length, boolean, or range based on the chosen data type to limit input content.
Required: If Yes is selected, the field will require a numerical value input. Otherwise, it can be ignored.
Select Save and the field will appear in the field list.
Step 3: Creating Object Instances¶
Select Object Manager > Object in the left navigation pane.
Find the desired object in the object list and select the Object Instance button on the right to enter the object instance list.
Select the Public or Private tab and choose a way to create an object instance:
Choose Import Object Instance to upload a file.
Choose New Object Instance and enter the required fields in the popup.
Public: Visible in all OUs.
Private: Visible only in the current OU.
Enter the information and select Save.
Step 4: (Optional) Creating Object Relationships¶
Select Object Manager > Object Relationships from the left navigation pane.
Enter the following information in the pop-up window:
Relationship Name: The name of the object relationship.
Identifier: The unique identifier of the object relationship.
Object: Select a previously created object as the primary object.
Related Object: Select another object to establish a relationship with.
Specify Foreign Key:
To specify a foreign key, select a string-type field in the Object other than Created By, Created Date, Last Modified By, and Last Modified Date, and associate it with the Related Object Field (which defaults to Identifier). It is recommended to choose a field with a unique value. For example, if the “Station Type List” is set as the primary object and the “Model List” is set as the related object, the “Related Model Identifier” field in the “Station Type List” can be specified as the foreign key, which is associated with the “Identifier” field in the “Model List” to form a relationship.
If no foreign key is specified, the relationship type between the objects must be defined. In a 1 to 1 relationship, one instance of an object is associated with only one instance of another object. For example, in the “Device List” and “Device Identifier List”, one device corresponds to only one device identifier. In a Many to 1 relationship, one instance of an object is associated with multiple instances of another object. For example, in the “Model List” and “Device Type List”, one model can be associated with multiple devices.
Description: A description of the object relationship.
Select Save.
Step 5: (Optional) Creating Views¶
Select Object Manager > Views from the left navigation pane.
Select New View, enter the name and identifier of the view in the pop-up window, and then select Save.
Select Configure to enter the view configuration page.
In the Add Related Objects section, select a primary object, and add related objects of the primary object to the view as needed.
In the Configure Fields section, check the fields in the selected object that should be displayed in the list. The selected fields can be dragged and sorted.
In the Table Content Sorting section, select a field in an object, and use the ascending or descending order of that field as the sorting criterion.
After configuring, select Save.