Developer Documentation Library > Data Model > Extending the UNICOM Intelligence Data Model > Working with the Alias Map component > Creating multiple aliases
 
Creating multiple aliases
Sometimes more than one alias is required for a single object. For example:
When the target has more objects than the source, such as a single UNICOM Intelligence Data Model multiple response VariableInstance that maps to several variables in IBM SPSS Statistics.
When the source object has a list of unnamed elements that require aliases.
The multiple alias feature facilitates the creation of multiple alias names from a single input text. (Multiple aliases are sometimes called subaliases.) Although you can generate multiple unique alias names without using the multiple alias feature, using it generally gives better results, particularly when you want the target names to be related. For example, if you simply call IMapper.CreateAlias the required number of times, the alias names can be very similar without actually conflicting. The following table shows an example of alias names created in this way for an object, called Name, that contains two groups of elements.
Element group
Alias names
First
Name1, Name2
Second
Name3, Name4
When you use the multiple alias feature (for example, by calling IMapper.CreateMultipleAlias), the alias names that are derived from the different element groups can be distinguished, for example:
Element group
Alias names
First
NameA1, NameA2
Second
NameB1, NameB2
Using the multiple alias feature is significantly more complicated than simply using the Alias Map component to create unique aliases. You need to tailor the generator configuration to meet the requirements of each group of subaliases and alternate the use of the IMapper.CreateAlias and IMapper.CreateMultipleAliases methods according to the requirements. For example, you need to tailor the generator configuration with the number of elements for which you want to create subaliases.
See also
Regular expressions
Structure of the Alias Map component
Examples of using the Alias Map component
Replacing the Generator and Dictionary
IGeneratorConfiguration
Examples of configuring the Generator
Working with the Alias Map component