Defining complex data type references
Defining complex data type references instead of defining attributes is useful, when the number of referenced elements varies, as a company might have got any number of addresses or hen the instance does not apply to many object instances (e.g. only a few students may have got a call to order). Object references are similar to attributes, i.e. they are deleted, when the referring object instance will be deleted and they are accessible via the referring object instance, only.
Reference names have to be unique within the members defined for a data type and its base types. Reference names are technical names and must not contain special characters or spaces except underscores. After filling in the reference name, Next should be pressed in order to continue. When the reference name is not correct or has already defined as member for the data type or one of its base types, an error will be displayed in the wizard's message area.
For selecting a complex (user-defined) data type, one may enter the type name directly in the Data type field or use enhanced find by pressing the Find button, which allows selecting a data type defined in the project or a system data type. When the data type entered does not yet exist, one may enter the new data type name in the field and press the New button. In this case, a sub wizard for defining new data type pops up ( Data Type Wizard ), which is described in chapter " Data Type Wizard" . For viewing the type definition for the selected type, the Details button may be used.
When instances with different data types are to be stored in the reference (collection), all referenced instances must inherit from the data type defined in the Data type field and Weak-typed has to be enabled. In order to store instances of any type in the collection, VOID has to be defined as data type and Weak-typed must be switched on.
The Next step allows specifying reference or collection type.
For defining a persistent reference (collection), the reference type persistent collection has to be selected. The Next step allows choosing between a multiple or singular reference.
In case that the maximum number of instances in a multiple reference collection has to be limited, the collection size (dimension) has to be updated. When a multiple reference has been defined, the Next step allows defining access keys (sort orders) for the collection.
Key definitions for the data type of the reference are listed as access key candidates. By default, the primary key is selected to be used as access key. One should select, however, only those keys, which are really needed for ordering the reference collection. In order to define an unordered collection, all keys in the list should be deselected.
The Next step shows the summary for the reference definition.
After confirming the wizard action with Finish , changes made on the current data type (and on its base type) are stored to the resource database.